ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject RE: Setting property for all targets
Date Fri, 30 Apr 2004 19:38:14 GMT
I'm not seeing enough context to be able to tell what
scenario you want to support.  If you can provide a
snippet representative of all three targets in
question, plus the command line you would -expect- to
be able to use, we might be able to take this further.

-Matt

--- "Jacob, Anil - MWT" <Jacob.Anil@menlolog.com>
wrote:
> 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}"/>
> </target>
> 
> 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.
> 
> Anil
> 
> -----Original Message-----
> From: Matt Benson [mailto:gudnabrsam@yahoo.com] 
> Sent: Friday, April 30, 2004 9:43 AM
> To: Ant Users List
> Subject: RE: Setting property for all targets
> 
> 
> --- "Jacob, Anil - MWT" <Jacob.Anil@menlolog.com>
> wrote:
> > 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.
> 
> -Matt
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs  
> http://hotjobs.sweepstakes.yahoo.com/careermakeover 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message