[ https://issues.apache.org/jira/browse/MANTRUN-172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16032160#comment-16032160 ]
Hudson commented on MANTRUN-172: -------------------------------- SUCCESS: Integrated in Jenkins build maven-plugins #8979 (See [https://builds.apache.org/job/maven-plugins/8979/]) [MANTRUN-172] Properties passed to Maven as -D don't get passed to <ant> invocations when a profile sets the same property Adding IT proving that r1797111 also fixed this issue. (gboue: [http://svn.apache.org/viewvc/?view=rev&rev=1797125]) * (add) maven-antrun-plugin/src/it/MANTRUN-172 * (add) maven-antrun-plugin/src/it/MANTRUN-172/build.xml * (add) maven-antrun-plugin/src/it/MANTRUN-172/invoker.properties * (add) maven-antrun-plugin/src/it/MANTRUN-172/pom.xml * (add) maven-antrun-plugin/src/it/MANTRUN-172/verify.bsh > Properties passed to Maven as -D don't get passed to <ant> invocations when a > profile sets the same property > ------------------------------------------------------------------------------------------------------------ > > Key: MANTRUN-172 > URL: https://issues.apache.org/jira/browse/MANTRUN-172 > Project: Maven Antrun Plugin > Issue Type: Bug > Affects Versions: 1.7 > Reporter: Derek Lewis > Attachments: maven-antrun-plugin-bug.zip > > > When I invoke Maven as follows: > mvn package -Dmy.test.property="from commandline" -Ptest-profile > Setting my.test.property on the command line, I expect to see the following > output from the testcase: > [echo] pom.xml: ptest = from commandline > [echo] pom.xml: my.test.property = from commandline > [echo] build.xml: ptest = from commandline > [echo] build.xml: my.test.property = from commandline > But instead I see: > [echo] pom.xml: ptest = from commandline > [echo] pom.xml: my.test.property = from commandline > [echo] build.xml: ptest = from commandline > [echo] build.xml: my.test.property = from profile > It looks like the <ant> task is causing properties set on the command line to > not be inherited. > When run without -Ptest-profile, the expected output is seen. The comments > on MANTRUN-121 would seem to imply that properties set on the commandline > should always be passed to sub <ant> builds, regardless of the value of the > inheritAll property. > I've tested with a profile in the pom as well as in settings.xml, and the > same behavior is observed regardless of where the profile is, so long as it > is activated. -- This message was sent by Atlassian JIRA (v6.3.15#6346)