o get rid of dead code

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@777553 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2009-05-22 14:52:30 +00:00
parent 44c864a463
commit 677a6b59d6
2 changed files with 0 additions and 104 deletions

View File

@ -1,32 +0,0 @@
package org.apache.maven.lifecycle;
import org.apache.maven.BuildFailureException;
/**
* Exception which occurs when a task or goal is specified on the command line
* but cannot be resolved for execution. This validation is done up front, and
* this exception wraps the {@link TaskValidationResult} generated as a result
* of verifying the task.
*
* @author jdcasey
*
*/
public class InvalidTaskException
extends BuildFailureException
{
private final String task;
public InvalidTaskException( TaskValidationResult result,
Throwable cause )
{
super( result.getMessage(), cause );
task = result.getInvalidTask();
}
public String getTask()
{
return task;
}
}

View File

@ -1,72 +0,0 @@
package org.apache.maven.lifecycle;
import org.apache.maven.plugin.InvalidPluginException;
import org.apache.maven.plugin.PluginLoaderException;
/** @author Jason van Zyl */
public class TaskValidationResult
{
private String invalidTask;
private String message;
private Throwable cause;
public TaskValidationResult()
{
}
public TaskValidationResult( String invalidTask,
String message,
PluginLoaderException cause )
{
this.invalidTask = invalidTask;
this.message = message;
this.cause = cause;
}
public TaskValidationResult( String invalidTask,
String message,
LifecycleExecutionException cause )
{
this.invalidTask = invalidTask;
this.message = message;
this.cause = cause;
}
public TaskValidationResult( String task,
String message,
InvalidPluginException e )
{
invalidTask = task;
this.message = message;
cause = e;
}
public String getInvalidTask()
{
return invalidTask;
}
public String getMessage()
{
return message;
}
public Throwable getCause()
{
return cause;
}
public boolean isTaskValid()
{
return invalidTask == null;
}
public InvalidTaskException generateInvalidTaskException()
{
InvalidTaskException e = new InvalidTaskException( this, cause );
return e;
}
}