Re: overriding properties via -D
It works fine for me, I had a test with Maven 3.0.2 and the following POM : project ... properties prop.to.override111/prop.to.override /properties profiles profile idprofile-test/id properties prop.to.override444/prop.to.override /properties /profile /profiles build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId version2.3.1/version executions execution iddefault-jar/id phasepackage/phase goals goaljar/goal /goals configuration archive manifestEntries modedevelopment/mode key${prop.to.override}/key /manifestEntries /archive /configuration /execution /executions /plugin /plugins /build /project Then execute 1) mvn help:effective-pom -Doutput=pom-default.xml key${prop.to.override}/key = key111/key 2) mvn help:effective-pom -Dprop.to.override=222 -Doutput=pom-override.xml key${prop.to.override}/key = key222/key 3) mvn help:effective-pom -P profile-test -Dprop.to.override=333 -Doutput=pom-profile-override.xml key${prop.to.override}/key = key333/key 4) mvn help:effective-pom -P profile-test -Doutput=pom-profile.xml key${prop.to.override}/key = key444/key Regards. Maxime Gréau. mgreau.com *Auteur du livre **Apache Maven - Maîtriser l'infrastructure d'un projet Java EE* http://goo.gl/ivCZW 2011/5/19 EJ Ciramella ecirame...@casenetinc.com Yep, I can clearly see that the -D property is NOT overriding the same property set in a profile. Just so I'm clear, there is a profile that has a bunch of settings that we want ALL of but ONE. On occasion. So instead of creating an entirely new profile, it would be so much simpler to just set the property (on those rare occasions) via -D. It seems like it's a known issue and it seems like it is supposedly resolved, so I can't tell if this is a regression or this is so simple I'm missing it. Thanks again for the feedback! -Original Message- From: Maxime Gréau [mailto:greaumax...@gmail.com] Sent: Wednesday, May 18, 2011 5:51 AM To: Maven Users List Subject: Re: overriding properties via -D Hi, To be sure that properties are correctly overridden, you can use maven-help-plugin with the goal effective-pom, like this : 1) mvn help:effective-pom -Doutput=pom-default.xml 2) mvn help:effective-pom -Dfoo=bar -Doutput=pom-override.xml 3) mvn help:effective-pom -P profil -Dfoo=bar -Doutput=pom-profil-override.xml 4) mvn help:effective-pom -P profil -Doutput=pom-profil.xml Then compare the foo properties in this files. Regards. Maxime Gréau. mgreau.com *Auteur du livre **Apache Maven - Maîtriser l'infrastructure d'un projet Java EE* http://goo.gl/ivCZW 2011/5/17 EJ Ciramella ecirame...@casenetinc.com For what it's worth, I've stumbled across a series of bugs surrounding this issue. This one either duplicates or is duplicated: http://jira.codehaus.org/browse/MNG-1992 -Original Message- From: EJ Ciramella [mailto:ecirame...@casenetinc.com] Sent: Tuesday, May 17, 2011 11:08 AM To: users@maven.apache.org Subject: overriding properties via -D Hi all - I've googled around and searched the mailing lists as I think this is a pretty simple thing to do, but didn't find a clear answer. If there is a profile that has a properties stanza in it and in turn is setting a property, are you not allowed to override that setting via a -Dfoo=bar commandline option? There are a couple of places where instead of defining a whole new profiles with just the value I'd like to change is inefficient. CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt. CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e
RE: overriding properties via -D
Huh - what version of maven are you using? Is this part of the resources plugin or is this core maven that does this? (I'm wondering if somewhere we have some wonky old plugin configured) -Original Message- From: Maxime Gréau [mailto:greaumax...@gmail.com] Sent: Friday, May 20, 2011 7:34 AM To: Maven Users List Subject: Re: overriding properties via -D It works fine for me, I had a test with Maven 3.0.2 and the following POM : project ... properties prop.to.override111/prop.to.override /properties profiles profile idprofile-test/id properties prop.to.override444/prop.to.override /properties /profile /profiles build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId version2.3.1/version executions execution iddefault-jar/id phasepackage/phase goals goaljar/goal /goals configuration archive manifestEntries modedevelopment/mode key${prop.to.override}/key /manifestEntries /archive /configuration /execution /executions /plugin /plugins /build /project Then execute 1) mvn help:effective-pom -Doutput=pom-default.xml key${prop.to.override}/key = key111/key 2) mvn help:effective-pom -Dprop.to.override=222 -Doutput=pom-override.xml key${prop.to.override}/key = key222/key 3) mvn help:effective-pom -P profile-test -Dprop.to.override=333 -Doutput=pom-profile-override.xml key${prop.to.override}/key = key333/key 4) mvn help:effective-pom -P profile-test -Doutput=pom-profile.xml key${prop.to.override}/key = key444/key Regards. Maxime Gréau. mgreau.com *Auteur du livre **Apache Maven - Maîtriser l'infrastructure d'un projet Java EE* http://goo.gl/ivCZW 2011/5/19 EJ Ciramella ecirame...@casenetinc.com Yep, I can clearly see that the -D property is NOT overriding the same property set in a profile. Just so I'm clear, there is a profile that has a bunch of settings that we want ALL of but ONE. On occasion. So instead of creating an entirely new profile, it would be so much simpler to just set the property (on those rare occasions) via -D. It seems like it's a known issue and it seems like it is supposedly resolved, so I can't tell if this is a regression or this is so simple I'm missing it. Thanks again for the feedback! -Original Message- From: Maxime Gréau [mailto:greaumax...@gmail.com] Sent: Wednesday, May 18, 2011 5:51 AM To: Maven Users List Subject: Re: overriding properties via -D Hi, To be sure that properties are correctly overridden, you can use maven-help-plugin with the goal effective-pom, like this : 1) mvn help:effective-pom -Doutput=pom-default.xml 2) mvn help:effective-pom -Dfoo=bar -Doutput=pom-override.xml 3) mvn help:effective-pom -P profil -Dfoo=bar -Doutput=pom-profil-override.xml 4) mvn help:effective-pom -P profil -Doutput=pom-profil.xml Then compare the foo properties in this files. Regards. Maxime Gréau. mgreau.com *Auteur du livre **Apache Maven - Maîtriser l'infrastructure d'un projet Java EE* http://goo.gl/ivCZW 2011/5/17 EJ Ciramella ecirame...@casenetinc.com For what it's worth, I've stumbled across a series of bugs surrounding this issue. This one either duplicates or is duplicated: http://jira.codehaus.org/browse/MNG-1992 -Original Message- From: EJ Ciramella [mailto:ecirame...@casenetinc.com] Sent: Tuesday, May 17, 2011 11:08 AM To: users@maven.apache.org Subject: overriding properties via -D Hi all - I've googled around and searched the mailing lists as I think this is a pretty simple thing to do, but didn't find a clear answer. If there is a profile that has a properties stanza in it and in turn is setting a property, are you not allowed to override that setting via a -Dfoo=bar commandline option? There are a couple of places where instead of defining a whole new profiles with just the value I'd like to change is inefficient. CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt. CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any
RE: overriding properties via -D
Yep, I can clearly see that the -D property is NOT overriding the same property set in a profile. Just so I'm clear, there is a profile that has a bunch of settings that we want ALL of but ONE. On occasion. So instead of creating an entirely new profile, it would be so much simpler to just set the property (on those rare occasions) via -D. It seems like it's a known issue and it seems like it is supposedly resolved, so I can't tell if this is a regression or this is so simple I'm missing it. Thanks again for the feedback! -Original Message- From: Maxime Gréau [mailto:greaumax...@gmail.com] Sent: Wednesday, May 18, 2011 5:51 AM To: Maven Users List Subject: Re: overriding properties via -D Hi, To be sure that properties are correctly overridden, you can use maven-help-plugin with the goal effective-pom, like this : 1) mvn help:effective-pom -Doutput=pom-default.xml 2) mvn help:effective-pom -Dfoo=bar -Doutput=pom-override.xml 3) mvn help:effective-pom -P profil -Dfoo=bar -Doutput=pom-profil-override.xml 4) mvn help:effective-pom -P profil -Doutput=pom-profil.xml Then compare the foo properties in this files. Regards. Maxime Gréau. mgreau.com *Auteur du livre **Apache Maven - Maîtriser l'infrastructure d'un projet Java EE* http://goo.gl/ivCZW 2011/5/17 EJ Ciramella ecirame...@casenetinc.com For what it's worth, I've stumbled across a series of bugs surrounding this issue. This one either duplicates or is duplicated: http://jira.codehaus.org/browse/MNG-1992 -Original Message- From: EJ Ciramella [mailto:ecirame...@casenetinc.com] Sent: Tuesday, May 17, 2011 11:08 AM To: users@maven.apache.org Subject: overriding properties via -D Hi all - I've googled around and searched the mailing lists as I think this is a pretty simple thing to do, but didn't find a clear answer. If there is a profile that has a properties stanza in it and in turn is setting a property, are you not allowed to override that setting via a -Dfoo=bar commandline option? There are a couple of places where instead of defining a whole new profiles with just the value I'd like to change is inefficient. CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt. CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: overriding properties via -D
Hi, To be sure that properties are correctly overridden, you can use maven-help-plugin with the goal effective-pom, like this : 1) mvn help:effective-pom -Doutput=pom-default.xml 2) mvn help:effective-pom -Dfoo=bar -Doutput=pom-override.xml 3) mvn help:effective-pom -P profil -Dfoo=bar -Doutput=pom-profil-override.xml 4) mvn help:effective-pom -P profil -Doutput=pom-profil.xml Then compare the foo properties in this files. Regards. Maxime Gréau. mgreau.com *Auteur du livre **Apache Maven - Maîtriser l'infrastructure d'un projet Java EE* http://goo.gl/ivCZW 2011/5/17 EJ Ciramella ecirame...@casenetinc.com For what it's worth, I've stumbled across a series of bugs surrounding this issue. This one either duplicates or is duplicated: http://jira.codehaus.org/browse/MNG-1992 -Original Message- From: EJ Ciramella [mailto:ecirame...@casenetinc.com] Sent: Tuesday, May 17, 2011 11:08 AM To: users@maven.apache.org Subject: overriding properties via -D Hi all - I've googled around and searched the mailing lists as I think this is a pretty simple thing to do, but didn't find a clear answer. If there is a profile that has a properties stanza in it and in turn is setting a property, are you not allowed to override that setting via a -Dfoo=bar commandline option? There are a couple of places where instead of defining a whole new profiles with just the value I'd like to change is inefficient. CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt. CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
overriding properties via -D
Hi all - I've googled around and searched the mailing lists as I think this is a pretty simple thing to do, but didn't find a clear answer. If there is a profile that has a properties stanza in it and in turn is setting a property, are you not allowed to override that setting via a -Dfoo=bar commandline option? There are a couple of places where instead of defining a whole new profiles with just the value I'd like to change is inefficient. CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt.
RE: overriding properties via -D
For what it's worth, I've stumbled across a series of bugs surrounding this issue. This one either duplicates or is duplicated: http://jira.codehaus.org/browse/MNG-1992 -Original Message- From: EJ Ciramella [mailto:ecirame...@casenetinc.com] Sent: Tuesday, May 17, 2011 11:08 AM To: users@maven.apache.org Subject: overriding properties via -D Hi all - I've googled around and searched the mailing lists as I think this is a pretty simple thing to do, but didn't find a clear answer. If there is a profile that has a properties stanza in it and in turn is setting a property, are you not allowed to override that setting via a -Dfoo=bar commandline option? There are a couple of places where instead of defining a whole new profiles with just the value I'd like to change is inefficient. CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt. CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org