I have a build.xml file that works fine the first time you run it, but after running an "ant clean" task that deletes the subdirectory that slice2java creates, then successive runs of ant do not rebuild things:
Code:
$ ant
Buildfile: build.xml
slice2java:
[slice2java] skipping vnp_subversion.ice
Right now, I need to touch the slice file for it to always regenerate the *.java files.
The top portion of our slice file:
Code:
#ifndef VNP_ICE
#define VNP_ICE
[["java:package:com.imageworks.vnp"]]
module SubversionIce
{
/** Generic exception. */
exception VnpIceException {
string message;
};
and a portion of our build.xml.
Code:
<project name="VnpSubversionServer" default="slice2java">
<property name="ice_home.dir" value="/usr/lib/Ice-3.1.1"/>
<property name="src.dir" value="src"/>
<property name="generated.dir"
value="${src.dir}/com/imageworks/vnp/SubversionIce"/>
<taskdef name="slice2java"
classpath="${ice_home.dir}/ant"
classname="Slice2JavaTask"/>
<target name="slice2java">
<!-- We seem to always need to run slice2java otherwise it
will not create the *.java files if they have been
deleted. -->
<slice2java outputdir="${src.dir}">
<fileset dir="slice" includes="vnp_subversion.ice"/>
</slice2java>
</target>
<target name="clean">
<delete file=".depend"/>
<delete dir="${generated.dir}"/>
<delete dir="${java.build.dir}"/>
<delete file="${vnp_svn.jar}"/>
<delete dir="${scala.build.dir}"/>
</target>
</project>
Any ideas on how to make slice2java rerun if the files it generates are gone?
Regards,
Blair