ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: logic using ant
Date Tue, 08 Mar 2005 08:45:45 GMT
You could also try a different thing:
- use a "stage" property (values: dev|test)
  <property name="stage" value="dev"/>
- define some <macrodefs> in two files
  dev.macros.xml
  <project><macrodef name="do">..do..this..</macrodef></project>

  test.macros.xml
  <project><macrodef name="do">..do..that..</macrodef></project>
- import the macros definition using the property
  <import file="${stage}.macros.xml"/>
- just invoke the action
  <do/>


Jan


> -----Ursprüngliche Nachricht-----
> Von: Matt Benson [mailto:gudnabrsam@yahoo.com]
> Gesendet am: Montag, 7. März 2005 23:42
> An: Ant Users List
> Betreff: Re: logic using ant
> 
> --- klute <soundres9@yahoo.com> wrote:
> > if some env variable indicates that the script is
> > running in windows env {
> >    do this
> > } else {
> >    do that
> > }
> > 
> > is this possible? 
> 
> There are ways and ways (the most brute-force and
> least "Ant" being ant-contrib's if task), but it will
> probably help you and us more for you to explain which
> parts of your Ant process you want to work differently
> based on environment so we can offer useful examples.
> 
> -Matt
> 
> > 
> > thanks a lot!
> > james
> > 
> > 
> > 	
> > 		
> > __________________________________ 
> > Celebrate Yahoo!'s 10th Birthday! 
> > Yahoo! Netrospective: 100 Moments of the Web 
> > http://birthday.yahoo.com/netrospective/
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> > user-help@ant.apache.org
> > 
> > 
> 
> 
> 
> 	
> 		
> __________________________________ 
> Celebrate Yahoo!'s 10th Birthday! 
> Yahoo! Netrospective: 100 Moments of the Web 
> http://birthday.yahoo.com/netrospective/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message