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/09/25 01:47:39 UTC

svn commit: r1389655 - /maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java

Author: hboutemy
Date: Mon Sep 24 23:47:38 2012
New Revision: 1389655

URL: http://svn.apache.org/viewvc?rev=1389655&view=rev
Log:
added explanations about the 2-phase generation necessary for Java 5 annotations

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=1389655&r1=1389654&r2=1389655&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 Mon Sep 24 23:47:38 2012
@@ -50,7 +50,14 @@ import java.util.List;
 import java.util.Properties;
 
 /**
- * Generates an <code>HelpMojo</code> class.
+ * Generates an <code>HelpMojo</code> class from <code>help-class-source.vm</code> template.
+ * The generated mojo reads help content from <code>META-INF/maven/${groupId}/${artifactId}/plugin-help.xml</code> resource,
+ * which is generated by this {@link PluginDescriptorGenerator}.
+ * <p>Notice that the help mojo source needs to be generated before compilation, but when Java 5 annotations are used,
+ * plugin descriptor content is available only after compilation (detecting annotations in .class files):
+ * help mojo source can be generated with empty package (and no plugin descriptor available), then updated
+ * after compilation through {@link #rewriteHelpMojo(PluginToolsRequest)} which is called from plugin descriptor XML
+ * generation.</p>
  *
  * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
  * @version $Id$