mojo's can be written in Java 1.4, which does not support annotations.

These are not annotations but actually javadoc tags

On 3 October 2011 10:00, justin tian <[email protected]> wrote:
> Hi,
>
> I see in this link
> http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
>
> package sample.plugin;
>
> import org.apache.maven.plugin.AbstractMojo;
> import org.apache.maven.plugin.MojoExecutionException;
>
> /**
>  * Says "Hi" to the user.
>  ** @goal sayhi*
>  */
> public class GreetingMojo extends AbstractMojo
> {
>    public void execute() throws MojoExecutionException
>    {
>        getLog().info("Hello, world.");
>    }
> }
>
> The comment line starting with "@goal" is an example of an annotation. This
> annotation is required, but there are a number of annotations which can be
> used to control how and when the mojo is executed.
>
>
> I have one question, why annotation can be in comment line, whether it
> still take effect in comment line, I do a similiar testing, seems it
> can not work,
>
>
> Can anyone help to take a look, thanks a lot!
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to