Return-Path: X-Original-To: apmail-maven-commits-archive@www.apache.org Delivered-To: apmail-maven-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B2E389712 for ; Sat, 26 May 2012 23:05:38 +0000 (UTC) Received: (qmail 67360 invoked by uid 500); 26 May 2012 23:05:38 -0000 Delivered-To: apmail-maven-commits-archive@maven.apache.org Received: (qmail 67303 invoked by uid 500); 26 May 2012 23:05:37 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 67294 invoked by uid 99); 26 May 2012 23:05:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 May 2012 23:05:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 May 2012 23:05:35 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 8BD912388860; Sat, 26 May 2012 23:05:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@maven.apache.org From: hboutemy@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120526230514.8BD912388860@eris.apache.org> 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 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 );