On Tue, 9 Dec 2003, Jeremy Nix <[EMAIL PROTECTED]> wrote:
> Notice that you touched a file (which creates a file) in the empty
> directory.
I did not. I touched a file in one dir, but there also is an empty
directory (d) and the empty as well as the dir including a file are
there.
> When you remove that touch command, all directories are empty
> (without files), and the war command contains nothing but the
> web.xml that you specified.
Let's see
[EMAIL PROTECTED] gump]$ rm -r /tmp/test.war /tmp/test-setup/
[EMAIL PROTECTED] gump]$ 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] gump]$ 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
[war] Building war: /tmp/test.war
BUILD SUCCESSFUL
Total time: 2 seconds
[EMAIL PROTECTED] gump]$ 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: WEB-INF/ OK
testing: WEB-INF/web.xml OK
No errors detected in compressed data of /tmp/tes
test of /tmp/test.war OK
it works. It may be that it doesn't work with 1.5.x, but it works for
me using 1.6.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]