I finally have time to try this out. One issue that I have found is that the ant-contrib Variable task uses the "user" property set to perform its magic of providing mutable ant properties. The problem with this is that the builtin="commandline" propertyset just returns the "user" properties. Therefore, I am getting a false builtin="commandline" propertyset with properties littered with ant-contrib variables.
One option I see is to find a way to copy a propertyset to essentially cache the "user" properties BEFORE my ant-contrib variables start being created. Then I can use that cached propertyset later on without any ant-contrib variables being inside. --- Shawn Castrianni -----Original Message----- From: Dominique Devienne [mailto:ddevie...@gmail.com] Sent: Monday, March 01, 2010 3:59 PM To: Ant Users List Subject: Re: Detect command line properties On Mon, Mar 1, 2010 at 10:28 AM, Shawn Castrianni <shawn.castria...@halliburton.com> 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: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org ---------------------------------------------------------------------- This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org