[MPLUGIN-168] Plugins with no mojos lead to exception and failure in PluginReport
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1164525 13f79535-47bb-0310-9956-ffa450edef68master
parent
f8e21c5bf7
commit
03e3a1d4c3
|
|
@ -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 );
|
||||
|
||||
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() + "\'",
|
||||
|
|
|
|||
|
|
@ -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?
|
||||
|
|
|
|||
Loading…
Reference in New Issue