Java Code Examples for org.apache.maven.plugin.MojoExecutionException#getMessage()
The following examples show how to use
org.apache.maven.plugin.MojoExecutionException#getMessage() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PropertyUpdatesReport.java From versions-maven-plugin with Apache License 2.0 | 6 votes |
protected void doGenerateReport( Locale locale, Sink sink ) throws MavenReportException { final Map<Property, PropertyVersions> updateSet; try { updateSet = getHelper().getVersionPropertiesMap( getProject(), properties, includeProperties, excludeProperties, autoLinkItems ); } catch ( MojoExecutionException e ) { throw new MavenReportException( e.getMessage(), e ); } PropertyUpdatesRenderer renderer = new PropertyUpdatesRenderer( sink, getI18n(), getOutputName(), locale, updateSet ); renderer.render(); }
Example 2
Source File: AbstractVersionsReport.java From versions-maven-plugin with Apache License 2.0 | 6 votes |
public VersionsHelper getHelper() throws MavenReportException { if ( helper == null ) { try { helper = new DefaultVersionsHelper( artifactFactory, artifactResolver, artifactMetadataSource, remoteArtifactRepositories, remotePluginRepositories, localRepository, wagonManager, settings, serverId, rulesUri, getLog(), session, pathTranslator ); } catch ( MojoExecutionException e ) { throw new MavenReportException( e.getMessage(), e ); } } return helper; }
Example 3
Source File: AbstractVersionsReport.java From versions-maven-plugin with Apache License 2.0 | 6 votes |
/** * {@inheritDoc} */ protected void executeReport( Locale locale ) throws MavenReportException { if ( !skip ) { try { doGenerateReport( locale, getSink() ); } catch ( MojoExecutionException e ) { throw new MavenReportException( e.getMessage(), e ); } } }
Example 4
Source File: UnsignTask.java From webstart with MIT License | 5 votes |
/** * {@inheritDoc} */ public void check( JnlpDependencyConfig config ) { if ( config == null ) { throw new NullPointerException( "config can't be null" ); } if ( config.getArtifact() == null ) { throw new NullPointerException( "config.artifact can't be null" ); } if ( config.getArtifact().getFile() == null ) { throw new NullPointerException( "config.artifact.file can't be null" ); } if ( !config.isSign() ) { throw new IllegalStateException( "Can't sign if config.isSign is false" ); } File file = config.getArtifact().getFile(); boolean jarSigned; try { jarSigned = signTool.isJarSigned( file ); } catch ( MojoExecutionException e ) { throw new RuntimeException( e.getMessage(), e.getCause() ); } if ( jarSigned && !config.isCanUnsign() ) { throw new IllegalStateException( "Can't unsign the config.artifact.file if config.isCanUsign is false" ); } }
Example 5
Source File: SignTask.java From webstart with MIT License | 5 votes |
/** * {@inheritDoc} */ public void check( JnlpDependencyConfig config ) { if ( config == null ) { throw new NullPointerException( "config can't be null" ); } if ( config.getArtifact() == null ) { throw new NullPointerException( "config.artifact can't be null" ); } if ( config.getArtifact().getFile() == null ) { throw new NullPointerException( "config.artifact.file can't be null" ); } if ( !config.isSign() ) { throw new IllegalStateException( "Can't sign if config.isSign is false" ); } File file = config.getArtifact().getFile(); boolean jarSigned; try { jarSigned = signTool.isJarSigned( file ); } catch ( MojoExecutionException e ) { throw new RuntimeException( e.getMessage(), e.getCause() ); } if ( jarSigned && !config.isCanUnsign() ) { throw new IllegalStateException( "Can't unsign the config.artifact.file if config.isCanUsign is false" ); } }
Example 6
Source File: AsciidocMojo.java From wisdom with Apache License 2.0 | 5 votes |
@Override public boolean fileCreated(File file) throws WatchingException { try { execute(); } catch (MojoExecutionException e) { throw new WatchingException(e.getMessage(), file, e); } return true; }
Example 7
Source File: DevMojo.java From ci.maven with Apache License 2.0 | 5 votes |
@Override public void redeployApp() throws PluginExecutionException { try { runLibertyMojoDeploy(); } catch (MojoExecutionException e) { throw new PluginExecutionException("liberty:deploy goal failed:" + e.getMessage()); } }