Looked at and followed : Ant - how to get all files' name in a specific folder
But I see jar names are either truncated or jumbled incorrectly in MANIFEST.MF
file.
Is there a way to fix it?
Here is excerpt of Ant target where I am seeing issue using manifestclasspath or with pathconvert approach..
<manifestclasspath property="jar.classpath" jarfile="${dist.dir}/Cling.ear">
<classpath>
<fileset dir="${dist.dir}/lib" includes="*.jar"/>
</classpath>
</manifestclasspath>
<echo message="${jar.classpath}"/>
<ear destfile="${dist.dir}/Cling.ear" appxml="${app.home}/WebContent/META-INF/application.xml" manifestencoding="UTF-8">
<fileset dir="${dist.dir}" includes="**" />
<manifest>
<attribute name="Implementation-Vendor" value="Some Company" />
<attribute name="encoding" value="UTF-8" />
<attribute name="Class-Path" value="${jar.classpath}" />
</manifest>
</ear>
Excerpt of that created section looks like below, where you can notice 2 jar names are truncated by some line size or some means & is continued on next line - which results in class not found exception when application is run..
Class-Path: lib/abcd-efg-1.2.11.jar lib/zzz.jar *lib/abc.def.gh.ijk.l
mno_8.5.0.jar* lib/com.abc.de.fig_8.5.0.jar *lib/com.blah.zz
2.some.jar*