ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <>
Subject Re: Re-parenting classpath
Date Wed, 17 Oct 2007 13:32:25 GMT
On 10/16/07,
<> wrote:
> Hopefully, someone can point me in the right direction. What I'd like to do is re-parent
the elements of a classpath entry in an Ant build script (from netbeans). For example, given
classpath property like:
> Setting project property: run.test.classpath ->
> ../lib/a.jar:../lib/dir1/b.jar:../lib/dir2/c.jar:build/classes:build/test/classes
> I'd like to zip up the classpath components from their current locations, but then re-parent
them within the zip file so that they get extracted to the following layout:
> a.jar
> b.jar
> c.jar
> classes
> The jar file names should be unique, so I'm not too worried about name clashes with the
jar files. Being new to Ant I don't see an easy way to get this done with the existing Ant
tasks (pathconvert, basename, zip, etc.). So, I'm hoping someone can tell if it can be done
(and how) or if there's some custom Ant task that already handles this functionality.

<manifestclasspath> can do that, indirectly. You're not saying why the
re-parenting, but the only use-case I know of is having a in-manifest
relative CP in a jar, which is the purpose of this task. You only get
a string out of it though, which may not be what you need. Hard to say
though given your post. --DD

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message