List of usage examples for org.apache.maven.plugin AbstractMojoExecutionException getLongMessage
public String getLongMessage()
From source file:com.codetroopers.maven.mergeprops.MergeMojo.java
License:Apache License
/** * @see org.apache.maven.plugin.AbstractMojo#execute() *///from w ww .ja va2 s . com @Override public void execute() throws MojoExecutionException, MojoFailureException { final String resourcePath = attachResourcePathToBuild(); List<AbstractMojoExecutionException> exceptions = new ArrayList<AbstractMojoExecutionException>(); for (Merge merge : merges) { try { new MergeProperty(merge, resourcePath, directory, getLog()).merge(); } catch (AbstractMojoExecutionException e) { exceptions.add(e); } } if (!exceptions.isEmpty()) { for (AbstractMojoExecutionException exception : exceptions) { getLog().error(exception.getMessage()); getLog().error(exception.getLongMessage()); } throw new MojoFailureException("Unable to merge properties, please check the logs"); } }
From source file:org.universAAL.support.directives.api.AbstractCheckMojo.java
License:Apache License
/** {@inheritDoc} */ public void execute() throws MojoExecutionException, MojoFailureException { check = getCheck();//from w ww . ja va 2s . c o m failed = false; AbstractMojoExecutionException failedE = null; try { if (!check.check(mavenProject, getLog())) { failed = true; } } catch (AbstractMojoExecutionException e) { failed = true; failedE = e; } if (failed && failOnMissMatch) { if (failedE == null) { throw new MojoFailureException(CHECK_FAILED); } else if (failedE instanceof MojoExecutionException) { throw (MojoExecutionException) failedE; } else if (failedE instanceof MojoFailureException) { throw (MojoFailureException) failedE; } } else if (failed) { if (failedE == null) { getLog().warn(CHECK_FAILED); } else { getLog().warn(failedE.getMessage() + ":\n\t" + failedE.getLongMessage()); } } }
From source file:org.universAAL.support.directives.mojos.CheckReportMojo.java
License:Apache License
/** * Render linked to Xref.// www. ja v a2 s. co m * @param ex */ private void renderException(Sink sink, AbstractMojoExecutionException ex) { if (ex != null) { sink.monospaced(); linkMessage(sink, ex.getMessage()); linkMessage(sink, ex.getLongMessage()); sink.monospaced_(); } }