ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Sampson" <jsamp...@covia.com>
Subject RE: zip file cannot include itself
Date Thu, 08 Mar 2001 20:15:11 GMT
Nolan Ring <nring@nortelnetworks.com> wrote:

> I'm stumped.  I'm getting a build failure and the error message is: "zip
> file cannot include itself" 
>
> As far as I know I'm not trying to include any zip files! 

I posted about the same thing yesterday. :)

The problem is right here:

   <jar jarfile="${UDCoutput}/core/Java/core.jar" 
        basedir="${UDCoutput}/core/Java" 
        manifest="${Sandbox}/manifest/manifest-for-build/MANIFEST-UDC.MF" 
   /> 

You're building a jar file of a directory within that directory. The jar
task opens the jar file for writing before scanning the directory, so the
jar file is included among the files to be put in the jar file.

Add an excludes attribute to explicitly leave out the jar file itself:

   <jar jarfile="${UDCoutput}/core/Java/core.jar" 
        basedir="${UDCoutput}/core/Java" 
        excludes="core.jar"
        manifest="${Sandbox}/manifest/manifest-for-build/MANIFEST-UDC.MF" 
   /> 

Justin


Mime
View raw message