Skip to content

Instantly share code, notes, and snippets.

@ppat
Created March 21, 2014 23:05
Show Gist options
  • Save ppat/9698334 to your computer and use it in GitHub Desktop.
Save ppat/9698334 to your computer and use it in GitHub Desktop.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<shadeTestJar>true</shadeTestJar>
<minimizeJar>true</minimizeJar>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<shadeSourcesContent>true</shadeSourcesContent>
<artifactSet>
<includes>
<include>org.apache.httpcomponents:httpasyncclient</include>
<include>org.apache.httpcomponents:httpcore</include>
<include>org.apache.httpcomponents:httpcore-nio</include>
<include>org.apache.httpcomponents:httpclient</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>org.apache.http</pattern>
<shadedPattern>com.theladders.apache.http</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/license/**</exclude>
<exclude>META-INF/*</exclude>
<exclude>META-INF/maven/**</exclude>
<exclude>LICENSE</exclude>
<exclude>NOTICE</exclude>
<exclude>/*.txt</exclude>
<exclude>build.properties</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment