IIRC those Java5 annotations are only used by the maven-plugin-plugin to 
generate META-INF/maven/plugin.xml and are not used by the core Maven runtime, 
in which case a retention policy of CLASS is ok:

        http://svn.apache.org/viewvc?view=revision&revision=1338003

The main benefit of using them is that if you extend a Maven plugin then the 
maven-plugin-plugin can see the Java5 annotations retained in the class file, 
whereas javadoc annotations are only in the source.

See http://jira.codehaus.org/browse/MPLUGIN-56 for the original use-case.

On 20 Sep 2013, at 19:34, Martin Gainty wrote:

> looks like we need to hire you to check our code..(provided you work for free)
> 
> package org.apache.maven.plugins.annotations;
> 
> import java.lang.annotation.RetentionPolicy;
> 
> @Documented
> @Retention( RetentionPolicy.CLASS )
> @Target( { ElementType.FIELD } )
> @Inherited
> public @interface Parameter
> 
> RetentionPolicy parameters:
> CLASS
> Annotations are to be recorded in the class file by the compiler
> but need NOT be retained by the VM at run time.
> 
> 
> 
> RUNTIME
> Annotations are to be recorded in the class file by the compiler and
> RETAINED by the VM at run time, so they may be read reflectively.
> 
> 
> 
> SOURCE
> Annotations are to be discarded by the compiler. 
> https://jira.codehaus.org/browse/MNG-5520
> 
> thanks Robert!
> Martin 
> ______________________________________________ 
> 
> 
> 
>> Date: Fri, 20 Sep 2013 00:42:59 -0700
>> From: [email protected]
>> To: [email protected]
>> Subject: RE: Stupid Question about plugin annotations
>> 
>> Thanks.  http://jira.codehaus.org/browse/MNG-5518 submitted with test case.
>> 
>> 
>> --
>> Robert Patrick <[email protected]>
>> VP, FMW Architects Team: The A-Team  
>> Oracle Corporation                   Office: +1.940.725.0011
>> 1148 Triple Crown Court                      Fax: +1.940.725.0012
>> Bartonville, TX 76226, USA           Mobile: +1.469.556.9450
>> 
>> A-Team Chronicles Blog: http://www.ateam-oracle.com/  
>> 
>> Professional Oracle WebLogic Server
>> by Robert Patrick, Gregory Nyberg, and Philip Aston
>> with Josh Bregman and Paul Done
>> Book Home Page: http://www.wrox.com/
>> Kindle Version: http://www.amazon.com/
>> 
>> 
>> -----Original Message-----
>> From: Anders Hammar [mailto:[email protected]] 
>> Sent: Friday, September 20, 2013 2:20 AM
>> To: Maven Developers List
>> Subject: Re: Stupid Question about plugin annotations
>> 
>> Actually, he needs to sign up on Codehaus Xircles.
>> 
>> /Anders
>> 
>> 
>> On Fri, Sep 20, 2013 at 9:06 AM, Lennart Jörelid
>> <[email protected]>wrote:
>> 
>>> You can sign up for a JIRA account on the JIRA welcome page.
>>> 
>>> You can find the respective JIRAs on
>>> http://maven.apache.org/issue-tracking.html
>>> 
>>> 
>>> 
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>                                         


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

Reply via email to