ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Earl Hood <earlh...@gmail.com>
Subject Re: Access jar files in a library directory in the jar file
Date Tue, 18 Jun 2013 18:53:43 GMT
On Tue, Jun 18, 2013 at 11:54 AM, Bruce Atherton wrote:
> It is fairly trivial to do. In your main jar target:
>
>     1. create a temporary directory
>     2. run the unjar task
>     3. jar up your main jar, including the contents of the temporary
> directory
>     4. delete the temporary directory

That is a way to do it, but it is inefficient and does not deal with
manifest entries (which may or may not matter depending on your needs).

Many moons ago, I wrote a java program to do jar merging, where it
supports inclusion and exclusion expressions (so you can merge subsets
of a jars) and attempts to also merge manifest entry information.  The
program is efficient in that it does not pre-extract the jar files, but
instead walks the jar structure when doing the merge.

Never made it into an Ant task.  When I do need it, I just use the
<java> task to call it.

IIRC, at the time (many years ago) there was not much interest in such a
facility of merging jars so I never packaged it up as an OSS project.

--ewh

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


Mime
View raw message