1. Removed apache commons math dep from curator-test
2. curator-test should have its own Guava shading as it doesn't have a 
dependency on curator-client


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/53b931af
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/53b931af
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/53b931af

Branch: refs/heads/master
Commit: 53b931afea58759577bbf5da30dd89c48182b76b
Parents: 9f9a043
Author: randgalt <randg...@apache.org>
Authored: Mon Jan 9 13:13:36 2017 -0500
Committer: randgalt <randg...@apache.org>
Committed: Mon Jan 9 13:13:36 2017 -0500

----------------------------------------------------------------------
 curator-recipes/pom.xml     |  6 ++++++
 curator-test/pom.xml        | 45 +++++++++++++++++++++++++++++++++++-----
 curator-x-discovery/pom.xml |  6 ++++++
 pom.xml                     |  8 +++++++
 4 files changed, 60 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/53b931af/curator-recipes/pom.xml
----------------------------------------------------------------------
diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml
index 8a53cc2..c3e095e 100644
--- a/curator-recipes/pom.xml
+++ b/curator-recipes/pom.xml
@@ -73,5 +73,11 @@
             <artifactId>slf4j-log4j12</artifactId>
             <scope>test</scope>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-math</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/curator/blob/53b931af/curator-test/pom.xml
----------------------------------------------------------------------
diff --git a/curator-test/pom.xml b/curator-test/pom.xml
index 3feb7ae..4cac12b 100644
--- a/curator-test/pom.xml
+++ b/curator-test/pom.xml
@@ -46,11 +46,6 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-math</artifactId>
-        </dependency>
-
-        <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
         </dependency>
@@ -67,4 +62,44 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>apache-curator-guava-shader</id>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <artifactSet>
+                                <includes>
+                                    <include>com.google.guava:guava</include>
+                                </includes>
+                            </artifactSet>
+                            <relocations>
+                                <relocation>
+                                    <pattern>com.google</pattern>
+                                    
<shadedPattern>org.apache.curator-test.shaded.com.google</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>com.google</pattern>
+                                    
<shadedPattern>org.apache.curator-test.shaded.com.google</shadedPattern>
+                                    <includes>
+                                        
<include>com.google.common.base.Function</include>
+                                        
<include>com.google.common.base.Predicate</include>
+                                        
<include>com.google.common.reflect.TypeToken</include>
+                                    </includes>
+                                </relocation>
+                            </relocations>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>

http://git-wip-us.apache.org/repos/asf/curator/blob/53b931af/curator-x-discovery/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml
index a7a7a21..8024351 100644
--- a/curator-x-discovery/pom.xml
+++ b/curator-x-discovery/pom.xml
@@ -72,5 +72,11 @@
             <artifactId>slf4j-log4j12</artifactId>
             <scope>test</scope>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-math</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/curator/blob/53b931af/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 634659b..c37595e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -812,6 +812,14 @@
                                     
<include>${project.groupId}:${project.artifactId}</include>
                                 </includes>
                             </artifactSet>
+                            <filters>
+                                <filter>
+                                    <artifact>com.google.guava:guava</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/**</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
                         </configuration>
                     </execution>
                 </executions>

Reply via email to