# [java] Eclipse's JarRsrcLoader and Implementation-Version attribute in manifest files

## Recommended Posts

brx    720
For my project I need to use the jarinjar loader of eclipse for deployment because some of the third party jars I am using need to keep their signature (namely the bouncycastle encryption library).

Now I want to add package versioning information. But after adding the "Implementation-Version" attribute to my ant file
[code]getClass().getPackage().getImplementationVersion()[/code]
still returns null.

I have the feeling that since my main-class is the JarRsrcLoader instead of my actual main-class the Implementation-Version is not passed through to my actual package. Does anybody have an idea how to solve this, or what I am doing wrong?

Here's the excerpt of my ant build file (slightly changed for NDA reasons and for brevity ):

[code]
<jar destfile="mytool${rmversion}${buildtime}.jar">
<manifest>
<attribute name="Rsrc-Main-Class" value="com.fs.Server"/>
<attribute name="Class-Path" value="."/>
<attribute name="Rsrc-Class-Path" value="./ bcprov-jdk16-145.jar"/>
<attribute name="Implementation-Version" value="${rmversion}${buildtime}"/>
</manifest>
<fileset dir="work" />
<fileset dir="WEB-INF/classes" />
<fileset dir="WEB-INF/lib" />
</jar>
[/code]
The properties rmversion and buildtime are set correctly. I also tried to embed the Implementation-Version attribute inside a section with the name of the package I want to add the information to.

Any help is highly appreciated.