[ 
https://issues.apache.org/jira/browse/MPLUGIN-322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15874136#comment-15874136
 ] 

Konrad Windszus commented on MPLUGIN-322:
-----------------------------------------

I expected the fields of the annotation, like {{defaultValue}}, {{required}} 
and {{alias}} to be evaluated as well. I admit though that in case transitive 
{{@Parameter}} annotations would be supported, this may lead to contradicting 
annotations (on the bean and within the bean). Therefore I am not requesting to 
change anything about that behaviour but rather just a clarification on the 
javadocs.

> The javadoc for the @Parameter annotation should clearly state that those are 
> only evaluated on fields of a Mojo
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: MPLUGIN-322
>                 URL: https://issues.apache.org/jira/browse/MPLUGIN-322
>             Project: Maven Plugin Tools
>          Issue Type: Documentation
>          Components: maven-plugin-annotations
>    Affects Versions: 3.5
>            Reporter: Konrad Windszus
>
> As it is not obvious that {{@Parameter}} annotations must only be used on 
> fields of a Mojo class (see 
> http://maven.40175.n5.nabble.com/why-the-defaultValue-is-not-being-injected-in-Parameter-inside-a-complex-parameter-bean-td5835732.html)
>  this should be explicitly stated. I would propose to change the javadoc in 
> http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/Parameter.java?revision=1757927&view=markup#l29
>  from
> {quote}
> Used to configure your Mojo parameters to be injected by
> <a 
> href="/ref/current/maven-core/apidocs/org/apache/maven/plugin/MavenPluginManager.html">
> <code>MavenPluginManager.getConfiguredMojo(...)</code></a>.
> {quote}
> to
> {quote}
> Used to configure your Mojo parameters to be injected by
> <a 
> href="/ref/current/maven-core/apidocs/org/apache/maven/plugin/MavenPluginManager.html">
> <code>MavenPluginManager.getConfiguredMojo(...)</code></a>.
> Although nested bean injection is supported by that method, this annotation 
> is only effective on fields of the Mojo class itself and not on fields of any 
> bean classes being used as Mojo parameter.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to