HTRACE-7: htrace-core should shade its dependencies to avoid leaking them on to client CLASSPATH (cmccabe)
diff --git a/.gitignore b/.gitignore
index b8acafe..a3b1b3e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,5 @@
*.iml
*.orig
*~
+*.swp
+dependency-reduced-pom.xml
diff --git a/htrace-core/pom.xml b/htrace-core/pom.xml
index 783fb39..a8ea8f1 100644
--- a/htrace-core/pom.xml
+++ b/htrace-core/pom.xml
@@ -42,6 +42,30 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <configuration>
+ <relocations>
+ <relocation>
+ <pattern>com.google.common</pattern>
+ <shadedPattern>org.apache.htrace.google.common</shadedPattern>
+ </relocation>
+ <relocation>
+ <pattern>org.mortbay</pattern>
+ <shadedPattern>org.apache.htrace.mortbay</shadedPattern>
+ </relocation>
+ </relocations>
+ </configuration>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
diff --git a/pom.xml b/pom.xml
index 0e5242a..067a7a9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -174,6 +174,11 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>