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