ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <>
Subject Questions about the <war> task
Date Tue, 10 Oct 2000 04:11:13 GMT
I have a couple of questions about the way the <war> task is intended to be
used, since I seem to be having problems getting it to behave the way I

1) For any error relating to a missing directory that I refer to, Ant gives
me an IllegalStateException with "basedir does not exist". This error is
incorrect, and when I finally figure out which directory is really missing,
it goes away without any change to the basedir value. This seems like a bug
to me...

2) Where should basedir normally point to? Is it expected to point at the
source root or the build root or somewhere else? If I point it at my build
root, I end up with my class files being included directly in the war file,
in addition to being included in their correct location (under WEB-INF) by
the <classes> element. It doesn't seem right that I should have to
explicitly exclude them in the <war> task itself, so I suspect I'm doing
something wrong.

3) Is there a way to specify a <fileset> that refers to a directory that may
or may not exist, without incurring an error if it does not? For example, if
I have <fileset dir="${mydir}/images"/> in my <war> task, I want it to
succeed if there is no 'images' subdirectory (yet) under the $mydir
directory. This would allow me to create a more generic build file, without
having to come back and modify it later when extra directories are added.


Martin Cooper
Tumbleweed Communications

View raw message