I am using Ant 1.5-beta1 and Sun JDK 1.4.0 on Windows 2000.
It appears that the "merge" option of the "filesetmanifest" attribute of the
"jar" task
does not work as described. Here are my targets:
<target name="jar.mk" depends="jar.mklib">
<jar jarfile="lib/mk.jar" filesetmanifest="merge" index="true">
<zipgroupfileset dir="lib">
<include name="cryptix32.jar"/>
<include name="mklib.jar"/>
</zipgroupfileset>
</jar>
</target>
<target name="jar.mklib" depends="javac.mk">
<manifest file="MicroKernel/manifest.mf">
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class"
value="com.pentasafe.mk.MicroKernel"/>
</manifest>
<jar jarfile="lib/mklib.jar" manifest="MicroKernel/manifest.mf">
<fileset dir="MicroKernel/classes">
<include name="com/pentasafe/**/*.class"/>
</fileset>
</jar>
</target>
There are definitely multiple manifest files in the jars being merged. If I
set the
"filesetmanifest" attribute to "skip", I get warnings as expected. When I
view the
"mklib.jar" whose target explicitly specifies a manifest, it does in fact
contain the
expected manifest.mf contents. However, the "mk.jar" whose target merges
several
jars into one single jar (including "mklib.jar"), the manifest is simply:
Manifest-Version: 1.0
Created-By: Apache Ant 1.5Beta1
Another thing to consider (this should probably be another post) is merging
the
"index-list" files of multiple jars merged together. The "jar" task just
adds multiple
"index-list" entries to the META-INF directory in the jar. Is that correct?
Other than this, Ant 1.5-beta1 rocks! I really needed the "concat" task. I
love
the way the "jar" task can now merge jars instead of using "jlink". The
"manifest"
task is also very handy! I can't wait until 1.5 is final -- not to mention
2.0!
Kevin Gross
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>