maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r690414 - /maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
Date Fri, 29 Aug 2008 22:50:34 GMT
Author: vsiveton
Date: Fri Aug 29 15:50:34 2008
New Revision: 690414

URL: http://svn.apache.org/viewvc?rev=690414&view=rev
Log:
o take car if pluginDescriptor.getName() is unknown

Modified:
    maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java

Modified: maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java?rev=690414&r1=690413&r2=690414&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
(original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
Fri Aug 29 15:50:34 2008
@@ -434,9 +434,18 @@
         writer.write( "        append( sb, \"\", 0 );" + LS );
         writer.write( LS );
 
-        writer.write( "        append( sb, \""
-            + StringUtils.escape( pluginDescriptor.getName() + " " + pluginDescriptor.getVersion()
)
-            + "\", 0 );" + LS );
+        if ( StringUtils.isNotEmpty( pluginDescriptor.getName() )
+            && ( pluginDescriptor.getName().indexOf( pluginDescriptor.getId() ) !=
-1 ) )
+        {
+            writer.write( "        append( sb, \""
+                + StringUtils.escape( pluginDescriptor.getName() + " " + pluginDescriptor.getVersion()
)
+                + "\", 0 );" + LS );
+        }
+        else
+        {
+            writer.write( "        append( sb, \"" + StringUtils.escape( pluginDescriptor.getName()
) + "\", 0 );"
+                + LS );
+        }
         writer.write( "        append( sb, \"" + toDescription( pluginDescriptor.getDescription()
) + "\", 1 );"
             + LS );
         writer.write( "        append( sb, \"\", 0 );" + LS );



Mime
View raw message