To achieve a sort of automation you can override the -post-dist target
in the project build.xml file.
For example:
<tempfile property="unpack.temp.dir" prefix="unpack" suffix=""/>
<target name="-post-dist" depends="unpack-jars, merge-jars"/>
<target name="unpack-jars">
<mkdir dir="${unpack.temp.dir}"/>
<unzip src="${jar1}" dest="${unpack.temp.dir}"/>
<unzip src="${jar2}" dest="${unpack.temp.dir}"/>
<unzip src="${jar3}" dest="${unpack.temp.dir}"/>
...
</target>
<target name="merge-jars">
<jar jarfile="${my.big.jar}">
<zipfileset dir="${unpack.temp.dir}"/>
</jar>
<delete dir="${unpack.temp.dir}" quiet="true" includeEmptyDirs="true"/>
</target>
Giampaolo
On Thu, May 8, 2008 at 5:09 PM, Richard Ivarson <
RiIvarson@...> wrote:
> Fabrizio Giudici schrieb:
>>
>> Remember that merging JARs can be explicitly prohibited by some licenses.
>> For instance, I believe that this practice is prohibited by GPL and LGPL.
>
> OK.
> However for my own library JARs, which I share between several projects, I'd
> wish to be able to make NB merge them into one JAR. Is this possible,
> somehow?
>
> -Richard
>
>