ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Castrianni <Shawn.Castria...@halliburton.com>
Subject RE: Detect command line properties
Date Mon, 01 Mar 2010 22:15:55 GMT
Thanks, I think that will help.  I am already using my own exec task I call smartexec.  I added
a lot of features similar to the cpptasks so that I can setup argsets with an ID that can
be reused for multiple smartexec tasks with REFID.  Each argset and arg inside can have if/unless
attributes as well as ifexpr/unlessexpr that support the full JEP expression syntax.  This
allows me to reuse argsets across platforms by qualifying the platform specific stuff with
the if/unless stuff.

Therefore, I should be able to enhance my own smartexec with this feature.  Thanks.

---
Shawn Castrianni


-----Original Message-----
From: Dominique Devienne [mailto:ddevienne@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.Castrianni@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-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@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-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message