ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Nix" <Jeremy....@sfsltd.com>
Subject RE: Need help including empty directories in WAR task (or Zip/JAR/TAR)
Date Tue, 09 Dec 2003 14:34:48 GMT
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.
Jeremy.Nix@sfsltd.com
(513) 621-6699 ext.1158



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


On Tue, 9 Dec 2003, Jeremy Nix <Jeremy.Nix@sfsltd.com> 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

[bodewig@bodewig gump]$ rm -r /tmp/test.war /tmp/test-setup/
[bodewig@bodewig 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>
[bodewig@bodewig 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
[bodewig@bodewig 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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message