Java Ninja Chronicles By Norris Shelton

Things I learned in the pursuit of code

We were given a project that built a custom server. They had the need to deploy the code and the dependencies. The dependencies were placed in /lib via the maven-dependency-plugin. They were generating the MANIFEST.MF via the maven-jar-plugin. The problem was that what was in the manifest wasn’t exactly what was in the lib directory. An example is in the lib directory, there was a file named adapter-models-1.0-SNAPSHOT.jar. Unfortunately, the manifest contained adapter-models-1.0-20141201.182800-510.jar in the Class-Path, which was the unique snapshot identifier.

I fixed this by adding useUniqueVersions to their manifest element of the maven-jar-plugin.

                            <Implementation-Version>${project.version}-${changeSet:} (${changeSetDate:})

December 1st, 2014

Posted In: Maven

Tags: , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

WP to LinkedIn Auto Publish Powered By :