maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1342989 - /maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
Date Sat, 26 May 2012 23:05:14 GMT
Author: hboutemy
Date: Sat May 26 23:05:14 2012
New Revision: 1342989

URL: http://svn.apache.org/viewvc?rev=1342989&view=rev
Log:
sort help content

Modified:
    maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java

Modified: maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java?rev=1342989&r1=1342988&r2=1342989&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
(original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
Sat May 26 23:05:14 2012
@@ -27,6 +27,7 @@ import org.apache.maven.plugin.descripto
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.tools.plugin.ExtendedMojoDescriptor;
 import org.apache.maven.tools.plugin.PluginToolsRequest;
+import org.apache.maven.tools.plugin.util.PluginUtils;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.PropertyUtils;
 import org.codehaus.plexus.util.StringUtils;
@@ -169,6 +170,12 @@ public class PluginDescriptorGenerator
             if ( pluginDescriptor.getMojos() != null )
             {
                 @SuppressWarnings( "unchecked" ) List<MojoDescriptor> descriptors =
pluginDescriptor.getMojos();
+
+                if ( helpDescriptor )
+                {
+                    PluginUtils.sortMojos( descriptors );
+                }
+
                 for ( MojoDescriptor descriptor : descriptors )
                 {
                     processMojoDescriptor( descriptor, w, helpDescriptor );
@@ -412,6 +419,11 @@ public class PluginDescriptorGenerator
 
         if ( parameters != null )
         {
+            if ( helpDescriptor )
+            {
+                PluginUtils.sortMojoParameters( parameters );
+            }
+
             for ( Parameter parameter : parameters )
             {
                 String expression = getExpression( parameter );



Mime
View raw message