ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
Subject RE: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Zip.java
Date Thu, 02 Aug 2001 04:41:30 GMT


> -----Original Message-----
> From: cmanolache@yahoo.com [mailto:cmanolache@yahoo.com]
> Sent: Thursday, 2 August 2001 1:02 PM
> To: ant-dev@jakarta.apache.org
> Subject: RE: cvs commit:
> jakarta-ant/src/main/org/apache/tools/ant/taskdefs Zip.java
>
>
> On Thu, 2 Aug 2001, Conor MacNeill wrote:
>
> > Costin,
> >
> > You should be using <zipfileset>.
> >
> > Please check the commit for revision 1.29
> > You should be using <zipfileset> rather than a <fileset>.
>
> Unfortunately, that would not work with Ant 1.3.

Why not? The change was made before the 1.3 release. The 1.3 branch was
taken at revision 1.30 and the release was built with 1.30.2.2. So I really
don't understand why this would not work with 1.3 unless your users are
using something else.

> With this change, the
> build.xml file will work with both 1.3 and 1.4.
>
> Incompatible changes should be minimized - this fix preserve
> backward compat, and I don't think the "price" is too big.

Works for me as follows

D:\antdev\bugs\zipfileset>ant -version
Ant version 1.3 compiled on March 2 2001

D:\antdev\bugs\zipfileset>type build.xml
<project name="test" default="main">

  <target name="main">
    <zip zipfile="test.zip">
       <zipfileset prefix="foo/bar" src="${ant.home}/lib/ant.jar"/>
    </zip>
  </target>
</project>

D:\antdev\bugs\zipfileset>ant
Buildfile: build.xml

main:
      [zip] Building zip: D:\antdev\bugs\zipfileset\test.zip

BUILD SUCCESSFUL

Total time: 1 second
D:\antdev\bugs\zipfileset>jar tvf test.zip
     0 Tue Jan 01 00:00:00 GMT+11:00 1980 foo/
     0 Tue Jan 01 00:00:00 GMT+11:00 1980 foo/bar/
     0 Tue Jan 01 00:00:00 GMT+11:00 1980 foo/bar/org/
     0 Tue Jan 01 00:00:00 GMT+11:00 1980 foo/bar/org/apache/
     0 Tue Jan 01 00:00:00 GMT+11:00 1980 foo/bar/org/apache/tools/
     0 Tue Jan 01 00:00:00 GMT+11:00 1980 foo/bar/org/apache/tools/ant/

If I change that to fileset, I get

D:\antdev\bugs\zipfileset>ant -version
Ant version 1.3 compiled on March 2 2001

D:\antdev\bugs\zipfileset>ant
Buildfile: build.xml

main:

BUILD FAILED

D:\antdev\bugs\zipfileset\build.xml:4: Class
org.apache.tools.ant.types.FileSet doesn't support the "prefix" attribute

Total time: 0 seconds
D:\antdev\bugs\zipfileset>

So Ant 1.3 is the same as Ant 1.4 alpha prior to your change. Can you check
the versions you are using?

Conor


Mime
View raw message