tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jon * <...@clearink.com>
Subject Re: omission of items attribute in jar taskdef (ant)
Date Mon, 06 Dec 1999 17:04:54 GMT
on 12/6/99 6:39 AM, Conor MacNeill <conor@m64.com> wrote:

> Hi,
> 
> I think there was a change recently to make sure the lack of an items
> attribute in the jar taskdef did not cause a NullPointerException. The
> solution was to always create the items Vector.
> 
> That's fine, but I was wondering if we could give some behaviour to the
> omission of an items attribute that was useful - specifically the inclusion
> of all files/directories contained in the basedir. If you were to use ant to
> create the WAR file example in the servlet spec, then you would need an
> items attribute like this
> 
> items="index.html, howto.jsp, feedback.jsp, images, WEB-INF"
> 
> As you can see the more files you have in the root directory, the more
> cumbersome the items attribute will become and the more difficult it will be
> to keep in sync with the actual files. This is the reason I would like to
> have the above behaviour. If this is desirable, it can be detected as either
> a null items variable or an empty items Vector, unless we want to
> distinguish these two conditions.
> 
> If this is desirable, I am happy to code it.
> 
> Cheers
> Conor

Take a look at the Zip taskdef and rip my code out of there. I was going to
do this for the Jar one, but was going to wait until I had more time to deal
with it in the proper way...which is to make a more generic file utility
class instead of having all this duplicated code in each taskdef.

-jon


Mime
View raw message