[
https://jira.codehaus.org/browse/MNG-5518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=333130#comment-333130
]
Stuart McCulloch commented on MNG-5518:
---------------------------------------
According to http://maven.apache.org/developers/mojo-api-specification.html the
javadoc-style @parameter had the following behaviour:
"NOTE: If neither default-value nor expression are specified, the parameter
can only be configured from the POM. The use of '${' and '}' is required to
delimit actual expressions which may be evaluated"
Also in the Java5 annotation the 'expression' attribute was renamed to
'property' and the need for '${' and '}' was dropped:
https://jira.codehaus.org/browse/MPLUGIN-196
So there is some consistency here in that it is possible to define a parameter
that cannot be overridden from the command-line, and an additional attribute is
required ('expression'/'default-value' for the javadoc annotation, 'property'
for the Java5 annotation) to enable the command-line support.
> @Parameter annotation requires property element to use command-line -D
> ----------------------------------------------------------------------
>
> Key: MNG-5518
> URL: https://jira.codehaus.org/browse/MNG-5518
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: Plugin API
> Affects Versions: 3.0.4, 3.1.0
> Environment: Windows 7 Pro 64 bit, JDK 1.7.0_40
> Reporter: Robert Patrick
> Attachments: annotations.zip
>
>
> When writing a plugin using the Maven Java annotations, the @Parameter
> annotation currently requires the property element to allow the goal to
> receive configuration information from the command-line using
> -DparamName=value even though the goal works fine without it when using a POM.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira