How can I make the exec task smart enough so that it won't do anything if the 
file generated by the task has already been created?

For example,

   <copy file="srcFile.txt" tofile="destFile.txt" verbose="true"/>

does nothing the second time.  Not sure how it works, but maybe if the 
timestamp of destFile.txt is equal to or larger than srcFile.txt than nothing 
happens.

So what I want is something like a generatedfile argument for exec.  For 
example:

    <exec executable="${java.home}/bin/keytool.exe" generatedfile="${keystore}">
      <arg value="-genkey"/>
      <arg value="-alias"/>
      <arg value="${alias}"/>
      <arg value="-keyalg"/>
      <arg value="RSA"/>
      <arg value="-validity"/>
      <arg value="36000"/>
      <arg value="-keystore"/>
      <arg value="${keystore}"/>
      <arg value="-storepass"/>
      <arg value="${storepass}"/>
      <arg value="-keypass"/>
      <arg value="${keypass}"/>
      <arg value="-dname"/>
      <arg value="${dname}"/>
    </exec>



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

Reply via email to