Example usage for org.apache.maven.plugin MojoExecutionException MojoExecutionException

List of usage examples for org.apache.maven.plugin MojoExecutionException MojoExecutionException

Introduction

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

Prototype

public MojoExecutionException(Object source, String shortMessage, String longMessage) 

Source Link

Document

Construct a new MojoExecutionException exception providing the source and a short and long message: these messages are used to improve the message written at the end of Maven build.

Usage

From source file:com.alexnederlof.jasperreport.JasperReporter.java

License:Apache License

private void checkIfOutpuCanBeCreated() throws MojoExecutionException {
    if (!outputDirectory.mkdirs()) {
        throw new MojoExecutionException(this, "Output folder could not be created",
                "Outputfolder " + outputDirectory.getAbsolutePath() + " is not a folder");
    }//from  w  w w.ja va  2 s  . c  om
}

From source file:com.alexnederlof.jasperreport.JasperReporter.java

License:Apache License

private void checkIfOutputDirIsWritable() throws MojoExecutionException {
    if (!outputDirectory.canWrite()) {
        throw new MojoExecutionException(this, "Could not write to output folder",
                "Could not write to output folder: " + outputDirectory.getAbsolutePath());
    }//w w  w .ja  v  a 2 s  . com
}