You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Aidan Monroe <ai...@yahoo.com> on 2003/02/06 00:29:50 UTC

Not Adding Files

I am trying to get the <zip> task to add some files to an existing .jar file. I cannot get it to work with an existing file, but it works just fine when creating a new archive file. Unfortunately, that is not what I want.

I have an existing file in zip format to which I try to add other archives using the following XML:

 <target name="test" depends="setup">
  <zip destfile="${output}/my.jar" update="yes">
   <zipgroupfileset dir="${basedir}/lib/" includes="abc.jar"/>
  </zip>
 </target>


This does not work. ANT exits cleanly with no error messages but the existing archive is not modified. If I change the above XML to this, it works fine (notice the name change of the destfile:

 <target name="test" depends="setup">
  <zip destfile="${output}/my2.jar" update="yes">
   <zipgroupfileset dir="${basedir}/lib/" includes="abc.jar"/>
  </zip>
 </target>


However, this is not what I want. According to the ANT documentation I should be able to do what I am trying, but I can't get it to work.

Any ideas would be helpful.

Thanks.

A



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Not Adding Files

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 5 Feb 2003, Aidan Monroe <ai...@yahoo.com> wrote:

> I am trying to get the <zip> task to add some files to an existing
> .jar file. I cannot get it to work with an existing file, but it
> works just fine when creating a new archive file. Unfortunately,
> that is not what I want.

<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10755>

The good news is, it is (supposed to be) fixed in CVS now.

Stefan

Re: Not Adding Files

Posted by Antoine Levy-Lambert <le...@tiscali-dsl.de>.
This is a well known bug
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10755
You need to download the latest nightly build of ant , for instance from
this URL http://cvs.apache.org/builds/jakarta-ant/nightly/2003-02-04/
Antoine Levy-Lambert
----- Original Message -----
From: "Aidan Monroe" <ai...@yahoo.com>
To: <an...@jakarta.apache.org>
Sent: Thursday, February 06, 2003 12:29 AM
Subject: <zip> Not Adding Files


>
> I am trying to get the <zip> task to add some files to an existing .jar
file. I cannot get it to work with an existing file, but it works just fine
when creating a new archive file. Unfortunately, that is not what I want.
>
> I have an existing file in zip format to which I try to add other archives
using the following XML:
>
>  <target name="test" depends="setup">
>   <zip destfile="${output}/my.jar" update="yes">
>    <zipgroupfileset dir="${basedir}/lib/" includes="abc.jar"/>
>   </zip>
>  </target>
>
>
> This does not work. ANT exits cleanly with no error messages but the
existing archive is not modified. If I change the above XML to this, it
works fine (notice the name change of the destfile:
>
>  <target name="test" depends="setup">
>   <zip destfile="${output}/my2.jar" update="yes">
>    <zipgroupfileset dir="${basedir}/lib/" includes="abc.jar"/>
>   </zip>
>  </target>
>
>
> However, this is not what I want. According to the ANT documentation I
should be able to do what I am trying, but I can't get it to work.
>
> Any ideas would be helpful.
>
> Thanks.
>
> A
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now