Keep backwards compatibility by deprecating old methods

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@587567 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Carlos Sanchez Gonzalez 2007-10-23 17:38:12 +00:00
parent 353cd5bac4
commit 2207068fe3
2 changed files with 94 additions and 13 deletions

View File

@ -36,6 +36,25 @@ public class DuplicateProjectException
private final File conflictingProjectFile;
/**
* @deprecated use {@link #DuplicateProjectException(String, File, File, String)}
*/
public DuplicateProjectException( String message )
{
this( null, null, null, message );
}
/**
* @deprecated use {@link #DuplicateProjectException(String, File, File, String)}
*/
public DuplicateProjectException( String message, Exception e )
{
super( message, e );
this.projectId = null;
this.existingProjectFile = null;
this.conflictingProjectFile = null;
}
public DuplicateProjectException( String projectId,
File existingProjectFile,
File conflictingProjectFile,

View File

@ -19,55 +19,117 @@ package org.apache.maven.project;
* under the License.
*/
import org.apache.maven.artifact.InvalidRepositoryException;
import org.apache.maven.project.interpolation.ModelInterpolationException;
import java.io.File;
import java.net.URI;
import org.apache.maven.project.validation.ModelValidationResult;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
public class InvalidProjectModelException
extends ProjectBuildingException
{
private ModelValidationResult validationResult;
/**
*
* @param projectId
* @param message
* @param pomFile pom file
* @param cause
*/
public InvalidProjectModelException( String projectId,
String pomLocation,
String message,
ModelInterpolationException cause )
File pomFile,
Throwable cause )
{
super( projectId, message, pomFile, cause );
}
/**
*
* @param projectId
* @param message
* @param pomLocation pom location
* @param cause
*/
public InvalidProjectModelException( String projectId,
String message,
URI pomLocation,
Throwable cause )
{
super( projectId, message, pomLocation, cause );
}
/**
*
* @param projectId
* @param message
* @param pomLocation pom location
*/
public InvalidProjectModelException( String projectId,
String message,
URI pomLocation )
{
super( projectId, message, pomLocation );
}
/**
* @deprecated use {@link #InvalidProjectModelException(String, String, File, Throwable)}
* @param projectId
* @param pomLocation absolute path of the pom file
* @param message
* @param cause
*/
public InvalidProjectModelException( String projectId,
String pomLocation,
String message,
InvalidRepositoryException cause )
Throwable cause )
{
super( projectId, message, pomLocation, cause );
super( projectId, message, new File( pomLocation ), cause );
}
/**
* @deprecated use {@link #InvalidProjectModelException(String, String, File, ModelValidationResult)}
* @param projectId
* @param pomLocation absolute path of the pom file
* @param message
* @param validationResult
*/
public InvalidProjectModelException( String projectId,
String pomLocation,
String message,
ModelValidationResult validationResult )
{
super( projectId, message, pomLocation );
this( projectId, message, new File( pomLocation ), validationResult );
}
public InvalidProjectModelException( String projectId,
String message,
File pomFile,
ModelValidationResult validationResult )
{
super( projectId, message, pomFile );
this.validationResult = validationResult;
}
public InvalidProjectModelException( String projectId,
String pomLocation,
String message )
String message,
File pomLocation )
{
super( projectId, message, pomLocation );
}
/**
* @deprecated use {@link #InvalidProjectModelException(String, String, File)}
* @param projectId
* @param pomLocation absolute path of the pom file
* @param message
*/
public InvalidProjectModelException( String projectId,
String pomLocation,
String message,
XmlPullParserException cause )
String message )
{
super( projectId, message, pomLocation, cause );
super( projectId, message, new File( pomLocation ) );
}
public final ModelValidationResult getValidationResult()