ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject How to make exec not run by timestamp?
Date Tue, 30 Dec 2008 03:25:38 GMT
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}"/>

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

View raw message