Skip to content

Instantly share code, notes, and snippets.

@bnyeggen
Created August 28, 2014 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnyeggen/b5bfd07c1fb35b2b90d7 to your computer and use it in GitHub Desktop.
Save bnyeggen/b5bfd07c1fb35b2b90d7 to your computer and use it in GitHub Desktop.
Maven uberjar via maven-shade-plugin
<plugin>
<!-- uberjar via "mvn package shade:shade" -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>THINGY</shadedClassifierName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.THINGY.Main</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<!-- put your configurations here -->
</configuration>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment