Stefan, you brought up an interesting point that I may have to consider. Notice that you touched a file (which creates a file) in the empty directory. The directory now has contents, thus is included in the fileset. 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. Is that my only option to include empty directories...that is, create a dummy file in them so that they aren't actually empty?
_________________________________ 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 3:04 AM To: [EMAIL PROTECTED] Subject: Re: Need help including empty directories in WAR task (or Zip/JAR/TAR) 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]