ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Raible <ma...@sourcebeat.com>
Subject Two <exec> tasks cause neither to run
Date Fri, 13 Aug 2004 00:51:31 GMT
I have the following two <exec> tasks in my build file.  I'm hoping that 
one executes for Linux, while the other does it for Windows.  I've found 
that if both are present, the whole target fails, but if I comment one 
out, then it'll run.  Any ideas what's causing this?  I'm also open to 
improved ways of doing the tasks below.

     <!-- Run on Linux -->
     <exec vmlauncher="false" 
dir="${software.repository}/samples-&product-version;/appfuse"
       executable="ant" os="Linux">
       <env key="PATH" 
path="${env.PATH};${software.repository}/&ant-dir;/bin"/>
       <env key="ANT_HOME" value="${software.repository}/&ant-dir;"/>
       <env key="JAVA_HOME" value="${env.JAVA_HOME}"/>
       <!-- CLASSPATH hack in case user has bad classpath vars -->
       <env key="classpath" value="${env.JAVA_HOME}/lib/tools.jar"/>
       <env key="ClassPath" value="${env.JAVA_HOME}/lib/tools.jar"/>
       <env key="Classpath" value="${env.JAVA_HOME}/lib/tools.jar"/>
       <env key="CLASSPATH" value="${env.JAVA_HOME}/lib/tools.jar"/>
       <arg line="install"/>
     </exec>
     <chmod dir="${software.repository}" perm="ugo+rwx" 
includes="samples-&product-version;/**/**"/>

     <!-- Run on Windows -->
     <exec vmlauncher="false" 
dir="${software.repository}/samples-&product-version;/appfuse" 
executable="ant.bat" os="Windows 2000,Windows XP,Windows 2003">
       <env key="Path" 
path="${env.Path};${software.repository}/&ant-dir;/bin"/>
       <env key="ANT_HOME" value="${software.repository}/&ant-dir;"/>
       <env key="JAVA_HOME" value="${env.JAVA_HOME}"/>
       <!-- CLASSPATH hack in case user has bad classpath vars -->
       <env key="classpath" value="${env.JAVA_HOME}/lib/tools.jar"/>
       <env key="ClassPath" value="${env.JAVA_HOME}/lib/tools.jar"/>
       <env key="Classpath" value="${env.JAVA_HOME}/lib/tools.jar"/>
       <env key="CLASSPATH" value="${env.JAVA_HOME}/lib/tools.jar"/>
       <arg line="install"/>
     </exec>

Thanks,

Matt


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


Mime
View raw message