How to override a property that was set in the command line via "-D..."

2014-07-31 Thread Al Le
user@ant.apache.org How to override a property that was set in the command line via "-D..." Hello. Could someone please help me with the following situation? I have some ant scripts that are used in two ways: 1. Standalone build, i.e. the script is executed directly from the command line 2. As

AW: How to override a property that was set in the command line via "-D..."

2014-07-31 Thread Knuplesch , Jürgen
Hello, because of the immutability of properties you have to redesign your scripts. The first time you set a property is it. You are usually not able t change it later. This is very important, because this is the only way to set properties from outside. Why does your command line call then use

Aw: AW: How to override a property that was set in the command line via "-D..."

2014-07-31 Thread Al Le
Hello. Thank you for the quick reply. I know that properties are immutable and should not be redefined. But my situation is, that the caller (be it command line or an ant script) sets the property for the called script. If the property is defined not in the command line but in the script itsel

AW: AW: How to override a property that was set in the command line via "-D..."

2014-07-31 Thread Knuplesch , Jürgen
Did you try inheritall=false option? -Ursprüngliche Nachricht- Von: Al Le [mailto:al...@gmx.de] Gesendet: Donnerstag, 31. Juli 2014 14:03 An: Ant Users List Betreff: Aw: AW: How to override a property that was set in the command line via "-D..." Hello. Thank you for the quick reply. I

Re: How to override a property that was set in the command line via "-D..."

2014-07-31 Thread Peter West
Peter West "...the kingdom of heaven is like a merchant in search of fine pearls, who, finding one pearl of great value, sold all that he had and bought it." Just define "well-known" properties which can be used from the command line, or set from within a master file, and define another "actual

Aw: AW: AW: How to override a property that was set in the command line via "-D..."

2014-07-31 Thread Al Le
Hello. No, i did not try it, though I think that it would solve the problem with this particular property. But I can't use the inheritall=false option because I want to pass quite a few properties from the main to the called script. Just one property should be re-defined. > Gesendet: Donners

Aw: Re: How to override a property that was set in the command line via "-D..."

2014-07-31 Thread Al Le
Hello Peter. Thank you for the advice! This should work indeed! I have not tried yet, but from reading the code I'm quite sure it will. It's a bit less nice (there are two properties instead of just one), but it will work. Though I'm still not quite satisfied that a script works differently depen