Sign in to follow this  

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

This topic is 2389 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
<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>
<zipfileset src="jar-in-jar-loader.zip"/>
<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.

Share this post


Link to post
Share on other sites

This topic is 2389 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this