On Mon, Mar 1, 2010 at 10:28 AM, Shawn Castrianni
<[email protected]> wrote:
> Is there a way to tell the difference between ant properties specified by the 
> user on the command line versus those that come from property files are or 
> hardcoded in the build.xml?  I have an ant build that execs to another ant 
> build (I use exec instead of <ant> or other similar tasks because I have 
> special setup in my custom bat/sh scripts that invoke ant) and I would like 
> the command line properties specified by the user to be forwarded to the 
> child ant build that I exec.  If I can detect them, then I can modify my exec 
> command line to include them.

<ant> supports a nested <propertyset builtin="commandline">, which
sounds like what you want (gets the User Properties), but <exec>
doesn't; so close ;)

OTOH, since you are exec'ing Ant, and Ant accepts a -propertyfile, if
you write a little task that can write a property set as a properties
file, you'd be all set I think.

You could also modify <exec> to take a <propertyset> with some
formatting rules (-D%name%=%value% in your case) to convert the
properties to command line arguments I guess. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to