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 build.properties I have:
run.classpath.javadoc="${JAVA_HOME}/lib/tools.jar"
run.classpath.mifdoclet="${WORKDIR}/build/jar/mifdoclet.jar"My script is:
<exec dir="${sample}/example-bookfile" executable="java">
<arg line="-classpath
${run.classpath.mifdoclet}:${run.classpath.javadoc}" />
<arg line="-Xmx20M" />
<arg line="com.sun.tools.javadoc.Main" />
<arg line="-doclet com.sun.tools.doclets.formats.mif.MIFDoclet" />
<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" />
</exec>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
[EMAIL PROTECTED] wrote:
You can use the <var> task of AntContrib or using <script> and
project.setProperty() to override an existing one.
BUT
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 [mailto:[EMAIL PROTECTED] 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. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Hi,
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
