DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13348>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13348 JAR creates file of the correct size, but with no contents Summary: JAR creates file of the correct size, but with no contents Product: Ant Version: 1.5.1 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Core tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] After the exception at the bottom of this post is thrown, an empty JAR file of the correct size is created. I have tried using the ZIP task with the same result. It only happens if I CLEAN before the build. Clean simply deletes 2 folders (classes and deploy) before recreating them with PREPARE. If I try to run the offending target (build.wlsejb) immediately after the build fails, it works. I think it might have something to do with a file being held open by a previously executed build task in the same run, but this is a guess. Our build file is built around compiling all core libraries, then, all application libraries. The application build DEPENDs on the core libraries being built. If I build the core libraries separately and then the application libraries, the process works faultlessly. Adding a subsequent task after the ejb build causes the same exception to be thrown, but on a different library. For instance, the following works: <target name="deploy.wlsrelease" depends="prepare.release"> <antcall target="deploy.wlsejb"/> </target> but adding <antcall target="build.jspframe"/> after, generates the exception. JSPFrame is a core application library that is not built by deploy.wlsejb. As previously stated, remove CLEAN and it works without error. An abbridged version of the build file follows: <target name="prepare.release" depends="clean"> <property name="javac.debug" value="off"/> <property name="javac.optimize" value="on"/> </target> <target name="deploy.wlsrelease" depends="prepare.release" > <antcall target="build.wlsejb"/><!-- Combines Client and Bean jars --> <antcall target="build.jspframe"/> </target> <target name="build.wlsejb" depends="build.romeoejb"> <!-- builds Client and Bean jars --> <jar destfile="${dist.dir}/build.jar" > <fileset dir="${build.dir}" > <include name="com/bankblocks/**/*"/> <include name="com/pfmejb/**/*"/> </fileset> </jar> </target> ******************************************************* clean: [delete] Deleting directory C:\Dev\JSPFrame\Java\Classes-md [delete] Deleting directory C:\Dev\JSPFrame\Java\Deploy-md prepare.release: prepare: [mkdir] Created dir: C:\Dev\JSPFrame\Java\Classes-md [mkdir] Created dir: C:\Dev\JSPFrame\Java\Deploy-md [echoproperties] #Ant properties [echoproperties] #Mon Oct 07 09:38:55 GMT+13:00 2002 [echoproperties] javac.debug=off [echoproperties] javac.optimize=on deploy.wlsrelease: prepare: [echoproperties] #Ant properties [echoproperties] #Mon Oct 07 09:38:55 GMT+13:00 2002 [echoproperties] javac.debug=off [echoproperties] javac.optimize=on build.monowai: [javac] Compiling 153 source files to C:\Dev\JSPFrame\Java\Classes-md [jar] Building jar: C:\Dev\JSPFrame\Java\Deploy-md\monowai.jar build.bankblocks: [javac] Compiling 84 source files to C:\Dev\JSPFrame\Java\Classes-md [jar] Building jar: C:\Dev\JSPFrame\Java\Deploy-md\bankblocks.jar build.romeoejb: [javac] Compiling 138 source files to C:\Dev\JSPFrame\Java\Classes-md [jar] Building jar: C:\Dev\JSPFrame\Java\Deploy-md\romeo_client.jar [jar] Building jar: C:\Dev\JSPFrame\Java\Deploy-md\romeo_beans.jar build.wlsejb: [jar] Building jar: C:\Dev\JSPFrame\Java\Deploy-md\build.jar deploy.wlsejb: [copy] Copying 1 file to C:\DEVAPPS\BEA\wlserver6.1 \config\mydomain\applications prepare: [echoproperties] #Ant properties [echoproperties] #Mon Oct 07 09:39:23 GMT+13:00 2002 [echoproperties] javac.debug=off [echoproperties] javac.optimize=on build.monowai: build.jspframe: [javac] Compiling 261 source files to C:\Dev\JSPFrame\Java\Classes-md [jar] Building jar: C:\Dev\JSPFrame\Java\Deploy-md\jspframe.jar BUILD FAILED java.lang.NullPointerException at org.apache.tools.zip.ZipOutputStream.finish(ZipOutputStream.java (Compiled Code)) at java.util.zip.DeflaterOutputStream.close (DeflaterOutputStream.java:139) at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:402) at org.apache.tools.ant.Task.perform(Task.java:319) at org.apache.tools.ant.Target.execute(Target.java:309) at org.apache.tools.ant.Target.performTasks(Target.java:336) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371) at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143) at org.apache.tools.ant.Task.perform(Task.java:319) at org.apache.tools.ant.Target.execute(Target.java:309) at org.apache.tools.ant.Target.performTasks(Target.java:336) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.Project.executeTargets(Project.java:1250) at org.apache.tools.ant.Main.runBuild(Main.java:610) at org.apache.tools.ant.Main.start(Main.java:196) at org.apache.tools.ant.Main.main(Main.java:235) -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
