diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java
index e31274c..25ea26d 100644
--- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java
+++ b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java
@@ -19,17 +19,18 @@ package org.apache.maven.plugin.plugin;
* under the License.
*/
+import java.io.File;
+
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.tools.plugin.generator.Generator;
import org.apache.maven.tools.plugin.generator.PluginHelpGenerator;
import org.codehaus.plexus.velocity.VelocityComponent;
-import java.io.File;
-
/**
* Generates a HelpMojo class.
*
@@ -37,7 +38,7 @@ import java.io.File;
* @version $Id$
* @since 2.4
*/
-@Mojo( name = "helpmojo", defaultPhase = LifecyclePhase.GENERATE_SOURCES, threadSafe = true /*, requiresDependencyResolution = ResolutionScope.COMPILE */ )
+@Mojo( name = "helpmojo", defaultPhase = LifecyclePhase.GENERATE_SOURCES, threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE )
public class HelpGeneratorMojo
extends AbstractGeneratorMojo
{
diff --git a/maven-plugin-tools-generators/src/main/resources/help-class-source.vm b/maven-plugin-tools-generators/src/main/resources/help-class-source.vm
index 407f9a7..18da3a2 100644
--- a/maven-plugin-tools-generators/src/main/resources/help-class-source.vm
+++ b/maven-plugin-tools-generators/src/main/resources/help-class-source.vm
@@ -4,6 +4,11 @@ package ${helpPackageName};
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
+#if ( $useAnnotations )
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+#end
+
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -24,10 +29,15 @@ import java.util.List;
* Call mvn ${goalPrefix}:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
* @author
* @version
+#if ( !$useAnnotations )
* @goal help
* @requiresProject false
* @threadSafe
+#end
*/
+#if ( $useAnnotations )
+@Mojo( name = "help", requiresProject = false, threadSafe = true )
+#end
public class HelpMojo
extends AbstractMojo
{