tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@m64.com>
Subject RE: [PATCH] eliminate duplicated code in ant Jar and Zip taskdefs
Date Wed, 29 Dec 1999 13:23:40 GMT
>
> >This patch eliminates the duplicated code in Jar.java and Zip.java
> taskdefs
> >by making Jar.java extend Zip.java. A desirable result of this is the
> >ability to specify an "items" value of "*" for Jar tasks indicating
> >inclusion into the jar file of all files/dirs in the basedir directory. I
> >think this will be important for building WAR files.
>
> I agree with everything above.  Two points:
>
> 1) If Jar extends Zip, then Jar has a setZipfile method.  This
> permits <jar
> zipfile="foo".../>.  As setZipfile and setJarfile are purely
> synonyms, this
> doesn't bother me much.

We could change "zipfile" to "target" which would make sense for zip, jar
and war but it would break existing build files. Alternatively we could
override setZipFile in Jar.java and throw an exception or do something
appropriate.

>
> 2) I realize that this is purely cosmetics, but it bothers me more.
> Executing "build jar" from the ant directory now responds with "Building
> zip: F:\jakarta-tools\ant.jar".  Thoughts?
>

We could do the following:

1. remove the word zip, eg Building: F:\ant.jar
2. Change zip to archive, eg Building archive: F:\ant.jar
3. Extract the extension and use that, eg Bulding war: F:\webapp.war

3 is more work so I vote for 2.

Cheers
Conor


Mime
View raw message