You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Roger Marlow <ro...@yahoo.com> on 2001/12/06 16:59:39 UTC

Missing top level dir in jar file

Hello,

Using the jar task in ant.1.4.1 I am missing the top level dir
from the paths in the jar. For example if I have files and dirs like
this:-

.
./base
./base/sub
./base/sub/file1.class
./base/sub/file2.class

Then in . I run  "jar cf ajar.jar base"

then "jar tf ajar.jar" we see :-

META-INF/
META-INF/MANIFEST.MF
base/
base/sub/
base/sub/file1.class
base/sub/file2.class

(note the top level base dir is included)

However if I have an ant file that tries to create the same jar file:-

<project name="test.jar" default="do.jar" basedir=".">
    <target name="do.jar">
       <jar jarfile="ajar.jar" basedir="base"/>
    </target>
</project>

And I run "ant" then "jar tf ajar.jar" on the resulting file I get:-

META-INF/
META-INF/MANIFEST.MF
sub/
sub/file1.class
sub/file2.class

Where has the "base" dir gone? What do I have to do to get
"base" dir into the path, other than by creating a dummy
parent dir?

Regards,

Roger.


________________________________________________________________
Nokia 5510 looks weird sounds great. 
Go to http://uk.promotions.yahoo.com/nokia/ discover and win it! 
The competition ends 16 th of December 2001.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>