ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Pringle <Jas...@captura.com>
Subject <jar> and <fileset> problems...
Date Thu, 08 Mar 2001 01:50:55 GMT
Ok, I'm obviously not understanding how <fileset> creates its list of files,
because the three (seemingly equivalent) task definitions don't all work.
(I know I can do the jar task simpler than below, but for the full version I
use multiple <fileset> nested attributes.  It just happens that it chokes on
the following one.)  The error I'm getting from <jar> is below (a duplicate
entry exception).  Is there a (simple) way to have the <fileset> output to
the screen?  Using -verbose or -debug doesn't work...evidently the task
fails before the <fileset> contents is logged. 

C:\dev\v50\build.xml:132: Problem creating jar: duplicate entry:
com/captura/system/common/crypto/Decryption.class
--- Nested Exception ---
java.util.zip.ZipException: duplicate entry:
com/foo/system/common/crypto/Bar.class
        at
java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:165)
        at org.apache.tools.ant.taskdefs.Zip.zipFile(Zip.java:455)
        at org.apache.tools.ant.taskdefs.Zip.zipFile(Zip.java:474)
        at org.apache.tools.ant.taskdefs.Jar.zipFile(Jar.java:130)
        at org.apache.tools.ant.taskdefs.Zip.addFiles(Zip.java:260)
        at org.apache.tools.ant.taskdefs.Zip.addFiles(Zip.java:549)
        at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:186)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.Project.executeTargets(Project.java:510)
        at org.apache.tools.ant.Main.runBuild(Main.java:421)
        at org.apache.tools.ant.Main.main(Main.java:149)

Working target:

  <target name="system" depends="compile-system"
          description="Creates the system JAR file">
    <jar jarfile="${deploy.dir}/jars/captura/system_gen.jar"
         basedir="${build.dest}"
         compress="no">
             <include name="${system.pkg.dir}/common/**"/>
    </jar>

Non-working targets:

  <target name="system" depends="compile-system"
          description="Creates the system JAR file">
    <jar jarfile="${deploy.dir}/jars/captura/system_gen.jar"
         basedir="${build.dest}"
         compress="no">
         <fileset dir="${build.dest}"
             includes="${system.pkg.dir}/common/**"
         />
    </jar>

  <target name="system" depends="compile-system"
          description="Creates the system JAR file">
    <jar jarfile="${deploy.dir}/jars/captura/system_gen.jar"
         basedir="${build.dest}"
         compress="no">
         <fileset dir="${build.dest}">
             <include name="${system.pkg.dir}/common/**"/>
         </fileset>
    </jar>



Mime
View raw message