On Mon, 8 Dec 2003, Jeremy Nix <[EMAIL PROTECTED]> wrote:
> I've been trying to figure out how to include an empty directory
> into a fileset based task for months now.
I've kept all (now four) of your messages on this subject in order to
look into it. Sorry, somehow I never manage to get far enough down on
my TODO list. I know that it works for me.
OK:
[EMAIL PROTECTED] bodewig]$ cat /tmp/war.xml
<project>
<mkdir dir="test-setup/a/b/c"/>
<mkdir dir="test-setup/d"/>
<touch file="test-setup/a/b/c/e"/>
<war destfile="test.war" webxml="${ant.file}">
<fileset dir="test-setup"/>
</war>
</project>
[EMAIL PROTECTED] bodewig]$ ant -f /tmp/war.xml
Buildfile: /tmp/war.xml
[mkdir] Created dir: /tmp/test-setup/a/b/c
[mkdir] Created dir: /tmp/test-setup/d
[touch] Creating /tmp/test-setup/a/b/c/e
[war] Building war: /tmp/test.war
BUILD SUCCESSFUL
Total time: 2 seconds
[EMAIL PROTECTED] bodewig]$ zip -Tv /tmp/test.war
Archive: /tmp/test.war
testing: META-INF/ OK
testing: META-INF/MANIFEST.MF OK
testing: a/ OK
testing: a/b/ OK
testing: a/b/c/ OK
testing: d/ OK
testing: a/b/c/e OK
testing: WEB-INF/ OK
testing: WEB-INF/web.xml OK
No errors detected in compressed data of /tmp/test.war.
test of /tmp/test.war OK
You see, d is included even though it is empty. This is Ant 1.6,
though.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]