ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob, Anil - MWT" <>
Subject RE: Setting property for all targets
Date Fri, 30 Apr 2004 17:28:22 GMT
I may be doing something wrong. 
Here is what I am doing -

Instead of using -Dproperty= option I have a target which takes input
from the user 
<target name="input">
<input message="Enter your value:" addproperty="value"/>
<echo message="value is set to:${value}"/>

Then I have a couple of targets where targetA depends on target
input(above), the second targetB depends on targetA. I see that the
${value} property is set in targetA but not in targetB which fails
because of this.

However If I run ant like this:

> ant  -Dvalue=xxxx targetB 
it works fine.


-----Original Message-----
From: Matt Benson [] 
Sent: Friday, April 30, 2004 9:43 AM
To: Ant Users List
Subject: RE: Setting property for all targets

--- "Jacob, Anil - MWT" <>
> Yes,
> When you set the -Dproperty=value cmd option the
> property is available
> to all tasks. How can the same option be used with
> an input task so that
> when the input task executes the property set is
> available to all tasks
> for the project.

How can it not?  As long as you're talking about a
single Ant invocation, that's what you get for free. 
Properties last throughout the life of the project,
not the target.


Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs 

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message