Example Workspace: Build fails with ZipException
Some users have experienced problems with building the Example Workspace and get the following Exception:
java.util.zip.ZipException: error in opening zip file
(or similar).
The reason is that there are .class files in the classpath (i.e. not a directory nor a jar file). Since version 1.6 Ant tries to open these files and searches for Manifest entries. This fails with with a java.util.zip.ZipException
How to avoid:
This problem occurs only when using Java 5 in combination with Ant 1.6. Using Ant 1.5 or Java 1.4 will fix the problem. Another solution is to kick .class files from the classpath (see exclude tag). <target name="build.class" depends="build.init">
<javac srcdir="${SRC}" destdir="${BUILD.CLASSES}"
debug="on" optimize="off" deprecation="on"
nowarn="true">
<classpath>
<fileset dir="${LIB}"/>
<!--fileset dir="${GENFWLIB}"/-->
<fileset dir="${GENFWLIB}">
<include name="**/*.jar"/>
<exclude name="*.class"/>
</fileset>
</classpath>
</javac>
<copy todir="${BUILD.CLASSES}">
<fileset dir="${SRC}" includes="**/*.xml"/>
</copy>
</target> <!-- build.class -->
Thanks to Wolfgang Frank for this hint!

