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 <[email protected]>

> 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:[email protected]]
> Sent: Tuesday, May 17, 2011 11:08 AM
> To: [email protected]
> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to