diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/InvalidTaskException.java b/maven-core/src/main/java/org/apache/maven/lifecycle/InvalidTaskException.java deleted file mode 100644 index 5f832a4d6d..0000000000 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/InvalidTaskException.java +++ /dev/null @@ -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; - } - -} diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/TaskValidationResult.java b/maven-core/src/main/java/org/apache/maven/lifecycle/TaskValidationResult.java deleted file mode 100644 index 2b181741d3..0000000000 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/TaskValidationResult.java +++ /dev/null @@ -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; - } -}