We\'re trying to build a client jar that includes unpacked dependent jar\'s. And the manifest should have class-path
entries to the dependent jars. T
You can add your dependencies as jar files to your jar:
assembly-descriptor.xml
uberjar
jar
false
false
runtime
false
${project.build.outputDirectory}
.
pom.xml
org.apache.maven.plugins
maven-assembly-plugin
2.6
make-uberjar
package
single
src/main/assemble/assembly-descriptor.xml
But unfortunately you can't use the Class-Path
header in manifest.mf
, see Adding Classes to the JAR File's Classpath:
Note: The
Class-Path
header points to classes or JAR files on the local network, not JAR files within the JAR file or classes accessible over Internet protocols. To load classes in JAR files within a JAR file into the class path, you must write custom code to load those classes. For example, ifMyJar.jar
contains another JAR file calledMyUtils.jar
, you cannot use theClass-Path
header inMyJar.jar's
manifest to load classes inMyUtils.jar
into the class path.