Example usage for org.apache.maven BuildFailureException BuildFailureException

List of usage examples for org.apache.maven BuildFailureException BuildFailureException

Introduction

In this page you can find the example usage for org.apache.maven BuildFailureException BuildFailureException.

Prototype

public BuildFailureException(String message) 

Source Link

Usage

From source file:org.codehaus.mojo.versions.DisplayPluginUpdatesMojo.java

License:Apache License

/**
 * Gets the lifecycle for phase.//  www.  j a  va 2 s .co  m
 *
 * @param lifecycles The list of lifecycles.
 * @param phase      the phase
 * @return the lifecycle for phase
 * @throws BuildFailureException       the build failure exception
 * @throws LifecycleExecutionException the lifecycle execution exception
 */
private Lifecycle getLifecycleForPhase(List lifecycles, String phase)
        throws BuildFailureException, LifecycleExecutionException {
    Lifecycle lifecycle = (Lifecycle) getPhaseToLifecycleMap(lifecycles).get(phase);

    if (lifecycle == null) {
        throw new BuildFailureException("Unable to find lifecycle for phase '" + phase + "'");
    }
    return lifecycle;
}