ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Douglas Kramer <Douglas.Kra...@Sun.COM>
Subject Re: AW: ant property
Date Fri, 25 Feb 2005 15:36:33 GMT
I'd like to set up my Ant script to load one set of paths
if I'm building on one machine and a different set of
paths when building on a another machine.

In I have:


My script is:

       <exec dir="${sample}/example-bookfile" executable="java">
          <arg line="-classpath ${run.classpath.mifdoclet}:${run.classpath.javadoc}" />
          <arg line="-Xmx20M" />
          <arg line="" />
          <arg line="-doclet" />
          <arg line="-book book-solaris.xml" />
          <arg line="-group 'Summary of Sample Packages' 'com.*'" />
          <arg line="-sourcepath ../sample-src com.package1 com.package1.subpackage com.package2"

I could switch on the machine name or either of these:

user.home  	User's home directory
user.dir 	User's current working directory

How would I set up the condition, please?

-Doug wrote:
> You can use the <var> task of AntContrib or using <script> and
> project.setProperty() 
> to override an existing one.
> you should think about your buildfile: the buildfile should describe your
> build
> process on a higher level than
> if-that-is-true-do-this-else-that-and-in-case-of-... 
> Keep in mind that Ant is not a functional programming language - never
> designed for that :-)
> Jan
>>-----Urspr√ľngliche Nachricht-----
>>Von: James Fuller []
>>Gesendet am: Freitag, 25. Februar 2005 15:45
>>An: Ant Users List
>>Betreff: Re: ant property
>>Rajiv Jaitly wrote:
>>>Please read the disclaimer at the bottom of this e-mail.
>>>Is there any was in Ant to reset (assign a new value) a 
>>property that was set previously ? As i understand ant 
>>properties are immutable, I do not want to set up a new 
>>property name every time i want to change the value.
>>maybe you could briefly describe your specific scenario....we 
>>might be 
>>able to suggest a solution with immutable properties that in the long 
>>run is perhaps more applicable....
>>gl, Jim Fuller
>>To unsubscribe, e-mail:
>>For additional commands, e-mail:

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

View raw message