ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject RE: Getting target name
Date Tue, 17 Aug 2004 22:02:16 GMT
The real answer here is another question:  why do you
need to do this?  Most likely a change in the
structure of your build file will solve your problem.

-Matt

--- "Gera, Prateek" <prateek.gera@hp.com> wrote:

> Jan 
> 
> That will not solve the problem. I have somehting
> like this in my build.xml
> 
> Target A depends C
> Target B depends C
> Target C
> {
> Set property "target-name"=??
> }
> 
> Target C may be called directly or indirectly by
> calling A. I want to set a property based on what
> was used on the ant command line.
> 
> OR,
> 
>   I can work around this issue if there is a way to
> conditionally a set property like this - 
> If "target-name" not set , "target-name"=A
> 
> 
> Thanks in advace
> prateek
> 
> 
> 
> -----Original Message-----
> From: Jan.Materne@rzf.fin-nrw.de
> [mailto:Jan.Materne@rzf.fin-nrw.de] 
> Sent: Wednesday, August 11, 2004 11:37 PM
> To: user@ant.apache.org
> Subject: AW: Getting target name
> 
> 
> Simply set the property inside the target :)
> 
> Jan
> 
> 
> > -----Ursprüngliche Nachricht-----
> > Von: Gera, Prateek [mailto:prateek.gera@hp.com]
> > Gesendet am: Donnerstag, 12. August 2004 00:14
> > An: user@ant.apache.org
> > Betreff: Getting target name
> > 
> > Hi All,
> >   How can I get the name of the target that ant
> was invoked with 
> > inside the build.xml. I want to set a property
> based on the target 
> > invoked. TIA
> > prateek
> > 
> >
>
---------------------------------------------------------------------
> > 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!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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


Mime
View raw message