[ 
https://issues.apache.org/jira/browse/MNG-6278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

S L updated MNG-6278:
---------------------
    Description: 
Hi I have a strange problem with a property definition inside an 
@Parameter-Annotation. 
Pretty much the configuration inside the plugin is as the following:
{code:java}
@Parameter(property = "maven.buildHelperMojo.skip", defaultValue = "false")
private boolean skip;
{code}
The original reference for this can be found here:
https://maven.apache.org/guides/plugin/guide-java-plugin-development.html#Parameters

Regardless whenever I define a value of this property inside the 
configuration-tag of the plugin and also provide an option via the commandline 
e.g. `-Dmaven.buildHelperMojo.skip=true` the value provided by commandline is 
getting ignored.

I have attached a sample project where the issue can be reproduced with the 
following:
> mvn clean install && mvn clean initialize -PdemoConfigSet 
> -Dmaven.buildHelperMojo.skip=true
- doesn't work since it has the configuration-tag set

> mvn clean install && mvn clean initialize -PdemoConfigUnSet 
> -Dmaven.buildHelperMojo.skip=true
- works as expected since it has the configuration-tag NOT set

  was:
Hi I have a strange problem with a property definition inside an 
@Parameter-Annotation. 
Pretty much the configuration inside the plugin is as the following:
{code:java}
@Parameter(property = "maven.buildHelperMojo.skip", defaultValue = "false")
private boolean skip;
{code}
The original reference for this can be found here:
https://maven.apache.org/guides/plugin/guide-java-plugin-development.html#Parameters

Regardless whenever I define the configuren of this property inside the 
configuration of the plugin and also provide an option via the commandline e.g. 
`-Dmaven.buildHelperMojo.skip=true` the value provided by commandline is 
getting ignored.

I have attached a sample project where the issue can be reproduced with the 
following:
> mvn clean install && mvn clean initialize -PdemoConfigSet 
> -Dmaven.buildHelperMojo.skip=true
- doesn't work since it has the configuration-tag set

> mvn clean install && mvn clean initialize -PdemoConfigUnSet 
> -Dmaven.buildHelperMojo.skip=true
- works as expected since it has the configuration-tag NOT set


> property inside @Parameter-Annotation is being ignored if it is also set 
> inside the configuration of the Plugin
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-6278
>                 URL: https://issues.apache.org/jira/browse/MNG-6278
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 3.2.5, 3.3.9, 3.5.0
>            Reporter: S L
>            Priority: Critical
>         Attachments: SampleProject_v2.zip, SampleProject.zip
>
>
> Hi I have a strange problem with a property definition inside an 
> @Parameter-Annotation. 
> Pretty much the configuration inside the plugin is as the following:
> {code:java}
> @Parameter(property = "maven.buildHelperMojo.skip", defaultValue = "false")
> private boolean skip;
> {code}
> The original reference for this can be found here:
> https://maven.apache.org/guides/plugin/guide-java-plugin-development.html#Parameters
> Regardless whenever I define a value of this property inside the 
> configuration-tag of the plugin and also provide an option via the 
> commandline e.g. `-Dmaven.buildHelperMojo.skip=true` the value provided by 
> commandline is getting ignored.
> I have attached a sample project where the issue can be reproduced with the 
> following:
> > mvn clean install && mvn clean initialize -PdemoConfigSet 
> > -Dmaven.buildHelperMojo.skip=true
> - doesn't work since it has the configuration-tag set
> > mvn clean install && mvn clean initialize -PdemoConfigUnSet 
> > -Dmaven.buildHelperMojo.skip=true
> - works as expected since it has the configuration-tag NOT set



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to