All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.maven.InvalidTaskException Maven / Gradle / Ivy

There is a newer version: 4.0.0-rc-2
Show newest version
package org.apache.maven;

import org.apache.maven.lifecycle.TaskValidationResult;

/**
 * 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;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy