Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
I'm attaching a sample project to show properties specified on the command-line (CLI) not being regarded when filtering true. These are being regarded for other purposes though.
Reproduce:
$ mvn test
$ cat target/test-classes/test.txt
Contents: default
$ mvn -P test.profile test
$ cat target/test-classes/test.txt
Contents: profile
$ mvn -Dtest.property='overridden' clean verify
Contents: default
$ mvn -P test.profile -Dtest.property='overridden' clean verify
Contents: profile
As you see last two results should have been "Contents: overridden".
The behavior is not completely broken though because if you try to set "test.include.pattern" then it works fine. Thus I set as component "filtering". This doesn't mean I've any idea where the issue lies. Test proj is a modified version of this on http://www.nabble.com/How-to-override-POM-properties-from-CLI-td15344487s177.html#a15605671
Issue Links
- duplicates
-
MRESOURCES-39
Filtering fails for command line properties
-
- is related to
-
MNG-1992
CLI -D should override properties in settings.xml
-
There could be some relationship with
MNG-1992but I see the same behavior with 2.1-snapshot as well.