How to execute an Ant task only if a file is changed? -
i have been trying use following code task working if file changed doesn't seem work. task called irrespective of whether there change or not.
<target name ="widget-change" depends="configuration-for-widgets"> <fileset dir="${src-location}"> <include name="com.myapp.mainclasses.myclassone.java"/> <include name="com.myapp.mainclasses.myclasstwo.java"/> <modified update="true"/> </fileset> <antcall target="gwt-compile"/> </target>
are using ant version less 1.8.0?
in getting ant selector work properly, asker resolved using depend
selector instead of modified.
in ant bug 32958, workaround suggested use nested update param
:
you may able work around using nested
<param name="update" value="false"/>
instead of update attribute.
Comments
Post a Comment