-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Corbin wrote:
> When I used to do ant, I always got frustrated by the way properties were 
> immutable.  I was always trying to use them as variables.
> 
> Now, I find myself wanting them back.
> 
> I would like to be able to declare proprties in my POM such that it will NOT 
> replace/define the property if it is already available (such as one that is 
> defined on the command line with -D).
> 
> Can this be done?

Would you please provide an example of what you are describing?  I read
your email several times.  However, I think there is a misunderstanding
here.

I believe it is desirable to localize as much of the project and
property definition in the pom.xml file for team communication.
Settings.xml files are used to supply or override per user information
such as passwords.

Finally, the -D command line options are designed to override the
settings in the pom.xml to trigger profiles or override defaults in the
pom.  Based on what the Sam's Ant Developer's Handbook says on page 87,
"It is important to note that properties set on the command line take
precedence over those set by <property> tasks or in properties files."
That Ant behavior sounds like the same behavior that Maven uses.

Perhaps you are looking for profile functionality?

Appendix A in this free pdf book,
http://www.mergere.com/m2book_download.jsp , has a good explanation of
expression evaluation and profile activation.  This may be a good
resource to explore what you are trying to do.

HTH

Regards,
Greg

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGQY2ixyxe5L6mr7IRAq2AAKCgXbuINOzobZZZylV4ztX8/qUThACgii3+
UbwBOD3xyEWUBdnNZs4qlHM=
=tpAf
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to