|
|
|
|||||
|
slice2java ant task not re-running
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 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;
};
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>
Regards, Blair |
|
|||||
|
Dependency problem when using --checksum
I ran into a problem with the ant dependency feature after I enabled checksums. If a built detects that only some of the slice files need to be rebuilt, my checksum class is remade from only the out of date slice files, and the class is then missing entries.
I made this patch to change the dependency tracking into an all-or-nothing rebuild, if the checksum feature is enabled. Code:
--- ant/Slice2JavaTask.java (revision 153092)
+++ ant/Slice2JavaTask.java (revision 153093)
@@ -118,6 +118,7 @@
// last updated or a slice file it depends on changed).
//
java.util.Vector buildList = new java.util.Vector();
+ java.util.Vector skipList = new java.util.Vector();
java.util.Iterator p = _fileSets.iterator();
while(p.hasNext())
{
@@ -137,7 +138,27 @@
}
else
{
- log("skipping " + files[i]);
+ skipList.addElement(slice);
+ }
+ }
+
+ if( _checksum != null && _checksum.length() > 0
+ && !buildList.isEmpty())
+ {
+ //
+ // If generating a checksum, all slice files must be compiled
+ // if any are out of date so that the checksum class contains
+ // all the entities from all the slice files.
+ //
+ buildList.addAll(skipList);
+ }
+ else
+ {
+ java.util.Iterator i = skipList.iterator();
+ while(i.hasNext())
+ {
+ File file = (File)i.next();
+ log("skipping " + file.getName());
}
}
}
Last edited by jrray : 11-29-2007 at 04:42 PM. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Duplicate naming error while running slice2java | Sameerrele | Help Center | 3 | 10-02-2006 08:52 AM |
| Problem running c++ Hello example programm | SiegfriedHora | Help Center | 2 | 09-17-2006 10:44 PM |
| Anyone compiled and running on Solaris x86? | ehup | Help Center | 0 | 09-05-2006 08:16 PM |
| slice2java task source code | xdm | Help Center | 1 | 12-15-2004 07:20 PM |
| running sample server error on rh9 | a2234 | Help Center | 1 | 10-12-2004 10:50 PM |