Making an executable JAR with Maven
Posted by CJxD on Mar 12, 2014; 5:03pm
URL: https://forum.jogamp.org/Making-an-executable-JAR-with-Maven-tp4031871.html
I'm using Maven for my project and it works great for running my application. However, when I deploy the application to a JAR file, it flattens the natives directory and thus JOGL cannot load the native libraries because the naming scheme is incorrect.
What do I need to do to make Maven include a natives/ directory?
This is what I currently use in my pom.xml:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>path.to.MainClass</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>