Repository: curator Updated Branches: refs/heads/CURATOR-3.0 304da977e -> 8e7fbac86
Shaded Guava into Curator Client (and Curator Test) so that it's no longer an issue for users. This should have been done a long time ago. Unfortunately, com.google.common.base.Function, com.google.common.base.Predicate and com.google.common.reflect.TypeToken are in Curator's public API so those 3 classes are NOT shaded. However, this won't be a problem because there's no reason to think that Guava will change or remove these basic interfaces Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/fb277f96 Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/fb277f96 Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/fb277f96 Branch: refs/heads/CURATOR-3.0 Commit: fb277f9601411427dee7d26dd2be76941d38c0c3 Parents: 125dc96 Author: randgalt <randg...@apache.org> Authored: Sat Jan 7 19:59:07 2017 -0500 Committer: randgalt <randg...@apache.org> Committed: Sat Jan 7 19:59:07 2017 -0500 ---------------------------------------------------------------------- curator-client/pom.xml | 40 ++++++++++++++++++++++++++++++++++++++-- curator-test/pom.xml | 38 +++++++++++++++++++++++++++++++++++++- pom.xml | 35 ++++++++++++++++++++++++++++++++++- 3 files changed, 109 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/curator/blob/fb277f96/curator-client/pom.xml ---------------------------------------------------------------------- diff --git a/curator-client/pom.xml b/curator-client/pom.xml index 11e4a77..784989c 100644 --- a/curator-client/pom.xml +++ b/curator-client/pom.xml @@ -1,5 +1,4 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- +<?xml version="1.0" encoding="UTF-8"?><!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information @@ -84,4 +83,41 @@ <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> + <filters> + <filter> + <artifact>com.google.guava:guava</artifact> + <excludes> + <exclude>com/google/common/base/Function.class</exclude> + <exclude>com/google/common/base/Predicate.class</exclude> + <exclude>com/google/common/reflect/TypeToken.class</exclude> + <exclude>META-INF/**</exclude> + </excludes> + </filter> + </filters> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> </project> + http://git-wip-us.apache.org/repos/asf/curator/blob/fb277f96/curator-test/pom.xml ---------------------------------------------------------------------- diff --git a/curator-test/pom.xml b/curator-test/pom.xml index 2e2c14c..0664b20 100644 --- a/curator-test/pom.xml +++ b/curator-test/pom.xml @@ -61,10 +61,46 @@ <scope>provided</scope> </dependency> - <dependency> + <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <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> + <filters> + <filter> + <artifact>com.google.guava:guava</artifact> + <excludes> + <exclude>com/google/common/base/Function.class</exclude> + <exclude>com/google/common/base/Predicate.class</exclude> + <exclude>com/google/common/reflect/TypeToken.class</exclude> + <exclude>META-INF/**</exclude> + </excludes> + </filter> + </filters> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> </project> http://git-wip-us.apache.org/repos/asf/curator/blob/fb277f96/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index fb992f0..634659b 100644 --- a/pom.xml +++ b/pom.xml @@ -79,7 +79,7 @@ <testng-version>6.8.8</testng-version> <swift-version>0.12.0</swift-version> <dropwizard-version>0.7.0</dropwizard-version> - <maven-shade-plugin-version>2.3</maven-shade-plugin-version> + <maven-shade-plugin-version>2.4.3</maven-shade-plugin-version> <slf4j-version>1.7.6</slf4j-version> <clirr-maven-plugin-version>2.6.1</clirr-maven-plugin-version> @@ -783,6 +783,39 @@ </execution> </executions> </plugin> + + <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> + <createDependencyReducedPom>false</createDependencyReducedPom> + <relocations> + <relocation> + <pattern>com.google</pattern> + <shadedPattern>org.apache.curator.shaded.com.google</shadedPattern> + <excludes> + <exclude>com.google.common.base.Function</exclude> + <exclude>com.google.common.base.Predicate</exclude> + <exclude>com.google.common.reflect.TypeToken</exclude> + </excludes> + </relocation> + </relocations> + <artifactSet> + <includes> + <include>${project.groupId}:${project.artifactId}</include> + </includes> + </artifactSet> + </configuration> + </execution> + </executions> + </plugin> </plugins> </build> </project>