diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java index 75b1e16..8b75539 100644 --- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java +++ b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java @@ -172,6 +172,7 @@ public class PluginReport } /** {@inheritDoc} */ + @SuppressWarnings( "unchecked" ) protected void executeReport( Locale locale ) throws MavenReportException { @@ -216,7 +217,16 @@ public class PluginReport PluginToolsRequest request = new DefaultPluginToolsRequest( project, pluginDescriptor ); request.setEncoding( encoding ); - mojoScanner.populatePluginDescriptor( request ); + try + { + mojoScanner.populatePluginDescriptor( request ); + } + catch ( InvalidPluginDescriptorException e ) + { + // this is OK, it happens to lifecycle plugins. Allow generation to proceed. + getLog().debug( "Plugin without mojos.", e ); + + } // Generate the plugin's documentation generatePluginDocumentation( pluginDescriptor, locale ); @@ -226,11 +236,7 @@ public class PluginReport locale ); r.render(); } - catch ( InvalidPluginDescriptorException e ) - { - throw new MavenReportException( "Error extracting plugin descriptor: \'" + e.getLocalizedMessage() + "\'", - e ); - } + catch ( ExtractionException e ) { throw new MavenReportException( "Error extracting plugin descriptor: \'" + e.getLocalizedMessage() + "\'", diff --git a/maven-plugin-plugin/src/main/resources/plugin-report.properties b/maven-plugin-plugin/src/main/resources/plugin-report.properties index 528ee05..01ee9b3 100644 --- a/maven-plugin-plugin/src/main/resources/plugin-report.properties +++ b/maven-plugin-plugin/src/main/resources/plugin-report.properties @@ -21,7 +21,7 @@ report.plugin.name=Plugin Documentation report.plugin.description=This report provides goals and parameters documentation of a plugin. report.plugin.title=Plugin Documentation -report.plugin.goals.nogoal=No goals available yet. +report.plugin.goals.nogoal=No goals defined in this plugin. report.plugin.goals.intro=Goals available for this plugin: report.plugin.goals.column.goal=Goal report.plugin.goals.column.isMavenReport=Report?