Skip to content

Instantly share code, notes, and snippets.

@jeongho
Created June 4, 2015 23:22
Show Gist options
  • Save jeongho/bb91d48091edea260622 to your computer and use it in GitHub Desktop.
Save jeongho/bb91d48091edea260622 to your computer and use it in GitHub Desktop.
maven shade plugin example
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
</transformers>
<createDependencyReducedPom>false</createDependencyReducedPom>
<relocations>
<relocation>
<!-- MR in CDH5.1 puts Guava 11 on the classpath, which breaks DQDataTypes -->
<pattern>com.google.common</pattern>
<shadedPattern>org.shaded.google.common</shadedPattern>
</relocation>
</relocations>
</configuration>
</plugin>
</plugins>
</build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment