Skip to content

Instantly share code, notes, and snippets.

@jarrod180
Last active October 19, 2017 11:15
Show Gist options
  • Select an option

  • Save jarrod180/7f51ca8d6ea4df3eab8dbcb7c2623589 to your computer and use it in GitHub Desktop.

Select an option

Save jarrod180/7f51ca8d6ea4df3eab8dbcb7c2623589 to your computer and use it in GitHub Desktop.
Maven Executable Jar With Dependencies - Add to pom.xml - simply set the main class
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<archive>
<manifest>
<mainClass>
com.mypackage.App
</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment