I am making an extra jar containing the project jar and all dependencies, as part of my maven build (with maven-assembly-plugin):
In assembly XML file:
<dependencySet>
<unpack>false</unpack>
<scope>runtime</scope>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
</dependencySet>
In POM:
<archive>
<manifest>
<mainClass>dk.intelligentsystems.platform.deploy.Deployer</mainClass>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
The jar contains the correct files, but the dependencies are not being added to the manufest Classpath attribute. How can I make that happen?
Instead of maven-assembly-plugin, I use maven-shade-plugin in combination with maven-jar-plugin for the same purpose.