You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2012/06/26 23:36:54 UTC
svn commit: r1354250 -
/maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
Author: hboutemy
Date: Tue Jun 26 21:36:53 2012
New Revision: 1354250
URL: http://svn.apache.org/viewvc?rev=1354250&view=rev
Log:
code simplification
Modified:
maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
Modified: maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java?rev=1354250&r1=1354249&r2=1354250&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java Tue Jun 26 21:36:53 2012
@@ -107,20 +107,18 @@ public class PluginHelpGenerator
if ( mojoDescriptors != null )
{
// Verify that no help goal already exists
- for ( MojoDescriptor descriptor : mojoDescriptors )
+ MojoDescriptor descriptor = pluginDescriptor.getMojo( HELP_GOAL );
+
+ if ( ( descriptor != null ) && !descriptor.getImplementation().equals( helpImplementation ) )
{
- if ( HELP_GOAL.equals( descriptor.getGoal() )
- && !descriptor.getImplementation().equals( helpImplementation ) )
+ if ( getLogger().isWarnEnabled() )
{
- if ( getLogger().isWarnEnabled() )
- {
- getLogger().warn( "\n\nA help goal (" + descriptor.getImplementation()
- + ") already exists in this plugin. SKIPPED THE "
- + helpImplementation + " GENERATION.\n" );
- }
-
- return;
+ getLogger().warn( "\n\nA help goal (" + descriptor.getImplementation()
+ + ") already exists in this plugin. SKIPPED THE " + helpImplementation
+ + " GENERATION.\n" );
}
+
+ return;
}
}