Skip to content

Instantly share code, notes, and snippets.

@kevinhooke
Created February 2, 2020 01:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinhooke/a1a2e01af791ee2e3f012e5777efbe72 to your computer and use it in GitHub Desktop.
Save kevinhooke/a1a2e01af791ee2e3f012e5777efbe72 to your computer and use it in GitHub Desktop.
Maven assembly - package with jar dependencies
<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>
your.main.class
</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