Arata created MANTRUN-178:
-----------------------------

             Summary: Ignore precedence of mvn command line over property 
defined in <properties> section
                 Key: MANTRUN-178
                 URL: https://jira.codehaus.org/browse/MANTRUN-178
             Project: Maven 2.x Antrun Plugin
          Issue Type: Bug
    Affects Versions: 1.7
         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 00:44:56-0800)
Java version: 1.6.0_22, vendor: Sun Microsystems Inc.
OS name: "windows xp"
arch: "x86"

            Reporter: Arata
         Attachments: antrun.zip

When (Maven) property is not defined in <properties> section in pom.xml and 
(System) property is given at mvn command line, then such property is picked up 
properly in Ant target.
When (Maven) property is defined in <properties> section in pom.xml and 
(System) property is given with different value at mvn command line, such 
property value in Ant target is kept to one defined in the <properties> 
section, not one given at mvn command line; and this conflicts with how other 
Maven plugins treats such property value. The expectation is that it picks up 
the value given at the mvn command line.

The antrun.zip attachment contains a sample Maven project. please try it run 
like:
    mvn -Dproptest_sysprop="defined" -Dproptest_Overwrite=true initialize

It will demonstrate the issue like:
         [echo] *** mvn recognizes proptest_Overwrite property value as "true". 
***
         ...
         [echo] *** Checking integrity over proptest_Overwrite property as case 
of overwriting hard-coded property value at mvn command line. ***
         [echo] 
         [echo] Dump of proptest_Overwrite value by Ant's echoproperties tag:
         ...
[echoproperties] proptest_Overwrite=false
         [echo] 
         [echo] Dump of proptest_Overwrite value by Ant's echo tag:
         [echo] proptest_Overwrite = true
         [echo] 
         [echo] proptest_Overwrite property value could keep integrity at Ant's 
equals condition tag: its value is recognized as "true".
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
...
[ERROR] Target exception: java.lang.RuntimeException: proptest_Overwrite 
property value could not keep integrity in Ant's Project object: expected 
"true" but actually "false"


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to