code simplification

git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1354250 13f79535-47bb-0310-9956-ffa450edef68
master
Herve Boutemy 2012-06-26 21:36:53 +00:00
parent af47cb96c6
commit c312cac3bb
1 changed files with 10 additions and 12 deletions

View File

@ -107,22 +107,20 @@ public class PluginHelpGenerator
if ( mojoDescriptors != null ) if ( mojoDescriptors != null )
{ {
// Verify that no help goal already exists // Verify that no help goal already exists
for ( MojoDescriptor descriptor : mojoDescriptors ) MojoDescriptor descriptor = pluginDescriptor.getMojo( HELP_GOAL );
{
if ( HELP_GOAL.equals( descriptor.getGoal() ) if ( ( descriptor != null ) && !descriptor.getImplementation().equals( helpImplementation ) )
&& !descriptor.getImplementation().equals( helpImplementation ) )
{ {
if ( getLogger().isWarnEnabled() ) if ( getLogger().isWarnEnabled() )
{ {
getLogger().warn( "\n\nA help goal (" + descriptor.getImplementation() getLogger().warn( "\n\nA help goal (" + descriptor.getImplementation()
+ ") already exists in this plugin. SKIPPED THE " + ") already exists in this plugin. SKIPPED THE " + helpImplementation
+ helpImplementation + " GENERATION.\n" ); + " GENERATION.\n" );
} }
return; return;
} }
} }
}
writeHelpPropertiesFile( request ); writeHelpPropertiesFile( request );