I'm trying to add a classpath to the jar generated by the maven-assembly-plugin. The assembly bulids, except the manifest has no classpath. Below is my configuration. Any help would be appreciated. Thanks!
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>assembly</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptors>
<descriptor>assembly/package.xml</descriptor>
</descriptors>
<archive>
<manifest>
<mainClass>mymain.Main</mainClass>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
I see you are using a custom assembly descriptor. But the plugin's documentation page has this to say about the <archive>
element:
At this point, only the jar assembly format supports the
<archive>
configuration element. By definition, directory-based assembly mojos - assembly:directory, assembly:directory-inline, and assembly:directory-single - do not produce a jar-format archive, and therefore do not support the<archive>
element.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With