David,

Thanks for the quick reply. As soon as I hit the send button I realized the answer to the compression question... happens every time. Are you sure about the path semantics accepting ../ style navigation? I had already tried that with no luck and I haven't been able to locate any reference to that in the online Ant manual. At any rate I can't seem to make it work. You understood perfectly my directory structure, but just to restate.

I have:

top
top/alpha
top/alpha/bin

top/beta
top/beta/bin

top/gamma
top/gamma/bin

The alpha, beta and gamma directories each contain the Ant build file for that project. The Eclipse compile places class files in the bin directory. I'm able to access the class files and create the jar for each project using something like:

beta Ant file
<jar jarfile="bin/beta.jar" includes="bin/**/*.class" basedir="."/>

but using 'up' navigation like so:

alpha Ant file
<jar jarfile="bin/alpha.jar" includes="../beta/bin/**/*.class, ../gamma/bin/**/*.properties, **/*.class" basedir="."/>


The beta Ant file correctly builds the beta.jar and the alpha Ant build file correctly picks up the class files from the alpha directory, but not the beta or gamma directories. I've tried ../, ../../ and even ../../../ just to make sure I wasn't missing a level. Either I'm doing something really stupid (wouldn't be the first time) or there's more to it. Just as a side note, what I'd prefer to do is include the jar files from beta and gamma into alpha, but I can't get that to work either. Any addiional suggestions?

TIA,

Bob


On Thursday, July 10, 2003, at 07:56 PM, Harkness, David wrote:


If you know that a, b, and c are at the same level (which you stated,
but just to make sure), you can access one from the other using normal
path semantics (".." goes "up" one directory level):

  In a:     ../b/bin
  In a/bin: ../../b/bin

As for JAR compression:

http://ant.apache.org/manual/CoreTasks/jar.html
compress: Not only store data but also compress them, defaults to true


Just use <jar ... Compress="no" ...> to disable it.

David Harkness
Sony Pictures Digital Networks
(310) 482-4756


-----Original Message----- From: Bob Barnes [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2003 7:24 PM To: [EMAIL PROTECTED] Subject: Newbie using Ant with Eclipse


Hi,


    I'm new to Eclipse and a total neophyte with Ant. I'm trying to use
Ant build files to generate jar files as part of my Eclipse project
build. I've succeeded in getting most things to build and create proper
jar files, but I'm having two problems. First of all I have a directory
structure something like:

a/bin
b/bin
c/bin

   Each bin directory contains an Ant created jar file. The jar file in
a/bin needs to include the jar files built in b/bin and c/bin, but I
can't seem to figure out how to reference those directories from a. Is
there a way to reference files from one directory to another when the
base directories are at the same level?

Second question is that the jar files are being compressed. As far as

I can tell I'm not explicitly requesting compression. Is there a way to
create a jar file that uncompressed?

TIA,

Bob


--------------------------------------------------------------------- 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