I apologize.  It appears that WinZip has misdirected me.  I took a look
at the contents of my warfile using the jar -tvf command and it
contained the empty directories.

Sometimes you get the bear, and sometimes the bear gets you. ;)


_________________________________
Jeremy Nix
Southwest Financial Services, LTD.
[EMAIL PROTECTED]
(513) 621-6699 ext.1158



-----Original Message-----
From: Stefan Bodewig [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 8:52 AM
To: [EMAIL PROTECTED]
Subject: Re: Need help including empty directories in WAR task (or
Zip/JAR/TAR)


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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to