Repository: incubator-ratis Updated Branches: refs/heads/master f970468b9 -> 183c64d51
RATIS-47. Shade google guava, and combine ratis-netty-shaded with ratis-proto-shaded. Contributed by Tsz Wo Nicholas Sze. Project: http://git-wip-us.apache.org/repos/asf/incubator-ratis/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ratis/commit/183c64d5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ratis/tree/183c64d5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ratis/diff/183c64d5 Branch: refs/heads/master Commit: 183c64d51a788532b75335066c2558e68b2ee349 Parents: f970468 Author: Jing Zhao <[email protected]> Authored: Mon Mar 20 15:43:15 2017 -0700 Committer: Jing Zhao <[email protected]> Committed: Mon Mar 20 15:43:15 2017 -0700 ---------------------------------------------------------------------- pom.xml | 19 +- ratis-common/pom.xml | 5 - .../java/org/apache/ratis/util/StringUtils.java | 4 +- ratis-examples/pom.xml | 5 - ratis-grpc/pom.xml | 5 + ratis-hadoop-shaded/pom.xml | 2 +- ratis-netty-shaded/.gitignore | 2 - ratis-netty-shaded/pom.xml | 495 ------------------- ratis-netty/pom.xml | 10 +- ratis-proto-shaded/pom.xml | 342 ++++++++++++- 10 files changed, 357 insertions(+), 532 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/183c64d5/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 1d4a5da..7e0869f 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,6 @@ <module>ratis-hadoop</module> <module>ratis-hadoop-shaded</module> <module>ratis-netty</module> - <module>ratis-netty-shaded</module> <module>ratis-proto-shaded</module> <module>ratis-server</module> </modules> @@ -145,6 +144,7 @@ <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version> <maven-javadoc-plugin.version>2.10.3</maven-javadoc-plugin.version> <maven-resources-plugin.version>2.6</maven-resources-plugin.version> + <maven-shade-plugin.version>2.4.3</maven-shade-plugin.version> <maven-site-plugin.version>3.5</maven-site-plugin.version> <maven-source-plugin.version>2.3</maven-source-plugin.version> <maven-stylus-skin.version>1.5</maven-stylus-skin.version> @@ -263,11 +263,6 @@ <type>test-jar</type> <scope>test</scope> </dependency> - <dependency> - <artifactId>ratis-netty-shaded</artifactId> - <groupId>org.apache.ratis</groupId> - <version>${project.version}</version> - </dependency> <dependency> <artifactId>ratis-proto-shaded</artifactId> @@ -301,12 +296,6 @@ </dependency> <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <version>20.0</version> - </dependency> - - <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> @@ -316,6 +305,12 @@ <artifactId>mockito-all</artifactId> <version>1.8.5</version> </dependency> + + <dependency> + <groupId>org.jctools</groupId> + <artifactId>jctools-core</artifactId> + <version>1.2.1</version> + </dependency> </dependencies> </dependencyManagement> http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/183c64d5/ratis-common/pom.xml ---------------------------------------------------------------------- diff --git a/ratis-common/pom.xml b/ratis-common/pom.xml index eb78f1d..6f8af13 100644 --- a/ratis-common/pom.xml +++ b/ratis-common/pom.xml @@ -44,11 +44,6 @@ </dependency> <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - </dependency> - - <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/183c64d5/ratis-common/src/main/java/org/apache/ratis/util/StringUtils.java ---------------------------------------------------------------------- diff --git a/ratis-common/src/main/java/org/apache/ratis/util/StringUtils.java b/ratis-common/src/main/java/org/apache/ratis/util/StringUtils.java index 4970764..7a2ddd0 100644 --- a/ratis-common/src/main/java/org/apache/ratis/util/StringUtils.java +++ b/ratis-common/src/main/java/org/apache/ratis/util/StringUtils.java @@ -17,8 +17,8 @@ */ package org.apache.ratis.util; -import com.google.common.collect.Interner; -import com.google.common.collect.Interners; +import org.apache.ratis.shaded.com.google.common.collect.Interner; +import org.apache.ratis.shaded.com.google.common.collect.Interners; import java.io.PrintWriter; import java.io.StringWriter; http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/183c64d5/ratis-examples/pom.xml ---------------------------------------------------------------------- diff --git a/ratis-examples/pom.xml b/ratis-examples/pom.xml index 0638382..81f4c3b 100644 --- a/ratis-examples/pom.xml +++ b/ratis-examples/pom.xml @@ -110,11 +110,6 @@ <scope>test</scope> <type>test-jar</type> </dependency> - <dependency> - <artifactId>ratis-netty-shaded</artifactId> - <groupId>org.apache.ratis</groupId> - <scope>provided</scope> - </dependency> <dependency> <groupId>org.slf4j</groupId> http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/183c64d5/ratis-grpc/pom.xml ---------------------------------------------------------------------- diff --git a/ratis-grpc/pom.xml b/ratis-grpc/pom.xml index c352cdc..c40dc2c 100644 --- a/ratis-grpc/pom.xml +++ b/ratis-grpc/pom.xml @@ -83,5 +83,10 @@ <artifactId>mockito-all</artifactId> <scope>test</scope> </dependency> + + <dependency> + <groupId>org.jctools</groupId> + <artifactId>jctools-core</artifactId> + </dependency> </dependencies> </project> http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/183c64d5/ratis-hadoop-shaded/pom.xml ---------------------------------------------------------------------- diff --git a/ratis-hadoop-shaded/pom.xml b/ratis-hadoop-shaded/pom.xml index d5bd980..cb74fa2 100644 --- a/ratis-hadoop-shaded/pom.xml +++ b/ratis-hadoop-shaded/pom.xml @@ -133,7 +133,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> - <version>2.4.3</version> + <version>${maven-shade-plugin.version}</version> <executions> <execution> <phase>package</phase> http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/183c64d5/ratis-netty-shaded/.gitignore ---------------------------------------------------------------------- diff --git a/ratis-netty-shaded/.gitignore b/ratis-netty-shaded/.gitignore deleted file mode 100644 index ce50505..0000000 --- a/ratis-netty-shaded/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -src/main/java -dependency-reduced-pom.xml http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/183c64d5/ratis-netty-shaded/pom.xml ---------------------------------------------------------------------- diff --git a/ratis-netty-shaded/pom.xml b/ratis-netty-shaded/pom.xml deleted file mode 100644 index b87b27e..0000000 --- a/ratis-netty-shaded/pom.xml +++ /dev/null @@ -1,495 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. See accompanying LICENSE file. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <artifactId>ratis</artifactId> - <groupId>org.apache.ratis</groupId> - <version>0.1-SNAPSHOT</version> - <relativePath>..</relativePath> - </parent> - - <artifactId>ratis-netty-shaded</artifactId> - <name>Ratis Netty Shaded</name> - <version>0.1-SNAPSHOT</version> - - <properties> - <maven.javadoc.skip>true</maven.javadoc.skip> - <!--The Default target dir--> - <classes.dir>${project.build.directory}/classes</classes.dir> - <!--The Default location for sources--> - <sources.dir>src/main/java</sources.dir> - - <!--Version of Netty to be shaded --> - <shaded.netty.version>4.1.3.Final</shaded.netty.version> - </properties> - - <build> - <!--I want to override these in profile so define them - with variables up here--> - <sourceDirectory>${sources.dir}</sourceDirectory> - <outputDirectory>${classes.dir}</outputDirectory> - <plugins> - <!-- Make a jar and put the sources in the jar --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <version>${maven-source-plugin.version}</version> - </plugin> - <plugin> - <!--Make it so assembly:single does nothing in here--> - <artifactId>maven-assembly-plugin</artifactId> - <version>${maven-assembly-plugin.version}</version> - <configuration> - <skipAssembly>true</skipAssembly> - </configuration> - </plugin> - </plugins> - </build> - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-all</artifactId> - <version>${shaded.netty.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> - - <dependencies> - <dependency> - <artifactId>ratis-proto-shaded</artifactId> - <groupId>org.apache.ratis</groupId> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>com.google.protobuf</groupId> - <artifactId>protobuf-java</artifactId> - <version>${shaded.protobuf.version}</version> - </dependency> - <dependency> - <groupId>com.google.protobuf.nano</groupId> - <artifactId>protobuf-javanano</artifactId> - <version>${shaded.protobuf.version}</version> - </dependency> - - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-all</artifactId> - <version>${shaded.netty.version}</version> - </dependency> - - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-buffer</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-codec</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-codec-dns</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-codec-haproxy</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-codec-http</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-codec-http2</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-codec-memcache</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-codec-mqtt</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-codec-socks</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-codec-stomp</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-common</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-handler</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-handler-proxy</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-resolver</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-resolver-dns</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-transport</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-transport-rxtx</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-transport-sctp</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-transport-udt</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-example</artifactId> - <version>${shaded.netty.version}</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - - <dependency> - <groupId>org.jboss.marshalling</groupId> - <artifactId>jboss-marshalling</artifactId> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <optional>true</optional> - </dependency> - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-api</artifactId> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <optional>true</optional> - </dependency> - - <dependency> - <groupId>com.jcraft</groupId> - <artifactId>jzlib</artifactId> - <version>1.1.3</version> - </dependency> - <dependency> - <groupId>com.ning</groupId> - <artifactId>compress-lzf</artifactId> - <version>1.0.3</version> - </dependency> - <dependency> - <groupId>net.jpountz.lz4</groupId> - <artifactId>lz4</artifactId> - <version>1.3.0</version> - </dependency> - <dependency> - <groupId>com.github.jponge</groupId> - <artifactId>lzma-java</artifactId> - <version>1.3</version> - </dependency> - <dependency> - <groupId>org.bouncycastle</groupId> - <artifactId>bcpkix-jdk15on</artifactId> - <version>1.54</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.8.0</version> - <scope>compile</scope> - <optional>true</optional> - </dependency> - - <dependency> - <groupId>org.eclipse.jetty.npn</groupId> - <artifactId>npn-api</artifactId> - <version>1.1.1.v20141010</version> - <scope>provided</scope> <!-- Provided by npn-boot --> - </dependency> - <dependency> - <groupId>org.eclipse.jetty.alpn</groupId> - <artifactId>alpn-api</artifactId> - <version>1.1.2.v20150522</version> - <scope>provided</scope> <!-- Provided by alpn-boot --> - </dependency> - - <dependency> - <groupId>org.jctools</groupId> - <artifactId>jctools-core</artifactId> - <version>1.2.1</version> - </dependency> - - </dependencies> - - <profiles> - <!-- Skip the tests in this module --> - <profile> - <id>skip-shaded-tests</id> - <activation> - <property> - <name>skip-shaded-tests</name> - </property> - </activation> - <properties> - <surefire.skipFirstPart>true</surefire.skipFirstPart> - </properties> - </profile> - - <profile> - <id>skipShade</id> - <activation> - <file> - <exists>${sources.dir}</exists> - </file> - <property> - <name>!shade-netty</name> - </property> - </activation> - </profile> - - <profile> - <id>shade-netty</id> - <!-- - Shade and drop the generated java files under src/main/java. - --> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <properties> - <profile.id>shade-netty</profile.id> - <!--When the compile for this profile runs, make sure it makes jars that - can be related back to this shading profile. Give them a shading prefix. - --> - <jar.finalName>${profile.id}.${project.artifactId}-${project.version}</jar.finalName> - </properties> - <build> - <finalName>${jar.finalName}</finalName> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <version>2.4.3</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <shadeSourcesContent>true</shadeSourcesContent> - <createSourcesJar>true</createSourcesJar> - <relocations> - <relocation> - <pattern>com.google.protobuf</pattern> - <shadedPattern>org.apache.ratis.shaded.com.google.protobuf</shadedPattern> - </relocation> - <relocation> - <pattern>io.netty</pattern> - <shadedPattern>org.apache.ratis.shaded.io.netty</shadedPattern> - </relocation> - </relocations> - - <filters> - <filter> - <artifact>io.netty:netty-all</artifact> - <includes> - <include>io/netty/**</include> - </includes> - </filter> - </filters> - - <artifactSet> - <excludes> - <exclude>com.barchart.udt:barchart-udt-bundle</exclude> - <exclude>com.github.jponge:lzma-java</exclude> - - <exclude>com.google.code.gson:gson</exclude> - <exclude>com.google.protobuf.nano:protobuf-javanano</exclude> - <exclude>com.google.protobuf:protobuf-java</exclude> - - <exclude>com.jcraft:jzlib</exclude> - <exclude>com.ning:compress-lzf</exclude> - <exclude>com.yammer.metrics:metrics-core</exclude> - <exclude>commons-logging:commons-logging</exclude> - - <exclude>io.netty:netty-buffer</exclude> - <exclude>io.netty:netty-codec-dns</exclude> - <exclude>io.netty:netty-codec-haproxy</exclude> - <exclude>io.netty:netty-codec-http2</exclude> - <exclude>io.netty:netty-codec-http</exclude> - <exclude>io.netty:netty-codec-memcache</exclude> - <exclude>io.netty:netty-codec-mqtt</exclude> - <exclude>io.netty:netty-codec-redis</exclude> - <exclude>io.netty:netty-codec-socks</exclude> - <exclude>io.netty:netty-codec-stomp</exclude> - <exclude>io.netty:netty-codec</exclude> - <exclude>io.netty:netty-common</exclude> - <exclude>io.netty:netty-example</exclude> - <exclude>io.netty:netty-handler-proxy</exclude> - <exclude>io.netty:netty-handler</exclude> - <exclude>io.netty:netty-resolver-dns</exclude> - <exclude>io.netty:netty-resolver</exclude> - <exclude>io.netty:netty-tcnative</exclude> - <exclude>io.netty:netty-transport-rxtx</exclude> - <exclude>io.netty:netty-transport-sctp</exclude> - <exclude>io.netty:netty-transport-udt</exclude> - <exclude>io.netty:netty-transport</exclude> - - <exclude>log4j:log4j</exclude> - <exclude>net.jpountz.lz4:lz4</exclude> - <exclude>org.apache.logging.log4j:log4j-api</exclude> - <exclude>org.bouncycastle:bcpkix-jdk15on</exclude> - <exclude>org.bouncycastle:bcprov-jdk15on</exclude> - <exclude>org.javassist:javassist</exclude> - <exclude>org.jboss.marshalling:jboss-marshalling</exclude> - <exclude>org.jctools:jctools-core</exclude> - <exclude>org.rxtx:rxtx</exclude> - <exclude>org.slf4j:slf4j-api</exclude> - </excludes> - </artifactSet> - </configuration> - </execution> - </executions> - </plugin> - <!--Now unpack the shaded jar made above so the shaded classes - are available to subsequent modules--> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>${maven-dependency-plugin.version}</version> - <executions> - <execution> - <id>unpack</id> - <phase>package</phase> - <goals> - <goal>unpack</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>${project.groupId}</groupId> - <artifactId>${project.artifactId}</artifactId> - <version>${project.version}</version> - <classifier>sources</classifier> - <type>jar</type> - <overWrite>true</overWrite> - <outputDirectory>${basedir}/src/main/java - </outputDirectory> - <includes>**/*.java</includes> - </artifactItem> - </artifactItems> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-install-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> - </plugins> - </build> - </profile> - </profiles> -</project> http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/183c64d5/ratis-netty/pom.xml ---------------------------------------------------------------------- diff --git a/ratis-netty/pom.xml b/ratis-netty/pom.xml index eefc433..d7d639b 100644 --- a/ratis-netty/pom.xml +++ b/ratis-netty/pom.xml @@ -33,11 +33,6 @@ <groupId>org.apache.ratis</groupId> <scope>provided</scope> </dependency> - <dependency> - <artifactId>ratis-netty-shaded</artifactId> - <groupId>org.apache.ratis</groupId> - <scope>provided</scope> - </dependency> <dependency> <artifactId>ratis-common</artifactId> @@ -89,5 +84,10 @@ <artifactId>mockito-all</artifactId> <scope>test</scope> </dependency> + + <dependency> + <groupId>org.jctools</groupId> + <artifactId>jctools-core</artifactId> + </dependency> </dependencies> </project> http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/183c64d5/ratis-proto-shaded/pom.xml ---------------------------------------------------------------------- diff --git a/ratis-proto-shaded/pom.xml b/ratis-proto-shaded/pom.xml index ea669c2..76148c4 100644 --- a/ratis-proto-shaded/pom.xml +++ b/ratis-proto-shaded/pom.xml @@ -37,6 +37,8 @@ <!--Version of grpc to be shaded --> <shaded.grpc.version>1.0.1</shaded.grpc.version> + <!--Version of Netty to be shaded --> + <shaded.netty.version>4.1.3.Final</shaded.netty.version> </properties> <build> @@ -62,35 +64,308 @@ </plugins> </build> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-all</artifactId> + <version>${shaded.netty.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + <dependencies> <dependency> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-java</artifactId> <version>${shaded.protobuf.version}</version> + <optional>true</optional> </dependency> - <dependency> <groupId>com.google.protobuf.nano</groupId> <artifactId>protobuf-javanano</artifactId> <version>${shaded.protobuf.version}</version> + <optional>true</optional> </dependency> <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-netty</artifactId> <version>${shaded.grpc.version}</version> + <optional>true</optional> </dependency> - <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-protobuf</artifactId> <version>${shaded.grpc.version}</version> + <optional>true</optional> </dependency> - <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-stub</artifactId> <version>${shaded.grpc.version}</version> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>com.google.code.findbugs</groupId> + <artifactId>jsr305</artifactId> + <version>1.3.9</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_annotations</artifactId> + <version>2.0.18</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>com.google.j2objc</groupId> + <artifactId>j2objc-annotations</artifactId> + <version>1.1</version> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>org.codehaus.mojo</groupId> + <artifactId>animal-sniffer-annotations</artifactId> + <version>1.15</version> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-all</artifactId> + <version>${shaded.netty.version}</version> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-buffer</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-codec</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-codec-dns</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-codec-haproxy</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-codec-http</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-codec-http2</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-codec-memcache</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-codec-mqtt</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-codec-socks</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-codec-stomp</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-common</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-handler</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-handler-proxy</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-resolver</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-resolver-dns</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-transport</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-transport-rxtx</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-transport-sctp</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-transport-udt</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-example</artifactId> + <version>${shaded.netty.version}</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>org.jboss.marshalling</groupId> + <artifactId>jboss-marshalling</artifactId> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <optional>true</optional> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <optional>true</optional> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>com.jcraft</groupId> + <artifactId>jzlib</artifactId> + <version>1.1.3</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>com.ning</groupId> + <artifactId>compress-lzf</artifactId> + <version>1.0.3</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>net.jpountz.lz4</groupId> + <artifactId>lz4</artifactId> + <version>1.3.0</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>com.github.jponge</groupId> + <artifactId>lzma-java</artifactId> + <version>1.3</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpkix-jdk15on</artifactId> + <version>1.54</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.8.0</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>org.eclipse.jetty.npn</groupId> + <artifactId>npn-api</artifactId> + <version>1.1.1.v20141010</version> + <scope>provided</scope> <!-- Provided by npn-boot --> + </dependency> + <dependency> + <groupId>org.eclipse.jetty.alpn</groupId> + <artifactId>alpn-api</artifactId> + <version>1.1.2.v20150522</version> + <scope>provided</scope> <!-- Provided by alpn-boot --> + </dependency> + + <dependency> + <groupId>org.jctools</groupId> + <artifactId>jctools-core</artifactId> + <optional>true</optional> </dependency> </dependencies> @@ -199,7 +474,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> - <version>2.4.3</version> + <version>${maven-shade-plugin.version}</version> <executions> <execution> <phase>package</phase> @@ -211,6 +486,14 @@ <createSourcesJar>true</createSourcesJar> <relocations> <relocation> + <pattern>com.google.common</pattern> + <shadedPattern>org.apache.ratis.shaded.com.google.common</shadedPattern> + </relocation> + <relocation> + <pattern>com.google.thirdparty.publicsuffix</pattern> + <shadedPattern>org.apache.ratis.shaded.com.google.thirdparty.publicsuffix</shadedPattern> + </relocation> + <relocation> <pattern>com.google.protobuf</pattern> <shadedPattern>org.apache.ratis.shaded.com.google.protobuf</shadedPattern> </relocation> @@ -218,28 +501,77 @@ <pattern>io.grpc</pattern> <shadedPattern>org.apache.ratis.shaded.io.grpc</shadedPattern> </relocation> + <relocation> + <pattern>io.netty</pattern> + <shadedPattern>org.apache.ratis.shaded.io.netty</shadedPattern> + </relocation> </relocations> + <filters> + <filter> + <artifact>io.netty:netty-all</artifact> + <includes> + <include>io/netty/**</include> + </includes> + </filter> + </filters> + <artifactSet> <excludes> + <exclude>com.barchart.udt:barchart-udt-bundle</exclude> + <exclude>com.github.jponge:lzma-java</exclude> + <exclude>com.google.code.findbugs:jsr305</exclude> <exclude>com.google.code.gson:gson</exclude> - <exclude>com.google.guava:guava</exclude> + <exclude>com.google.errorprone:error_prone_annotations</exclude> + <exclude>com.google.j2objc:j2objc-annotations</exclude> + + <exclude>com.jcraft:jzlib</exclude> + <exclude>com.ning:compress-lzf</exclude> + <exclude>com.yammer.metrics:metrics-core</exclude> + <exclude>commons-logging:commons-logging</exclude> <exclude>io.netty:netty-buffer</exclude> + <exclude>io.netty:netty-codec-dns</exclude> + <exclude>io.netty:netty-codec-haproxy</exclude> <exclude>io.netty:netty-codec-http2</exclude> <exclude>io.netty:netty-codec-http</exclude> + <exclude>io.netty:netty-codec-memcache</exclude> + <exclude>io.netty:netty-codec-mqtt</exclude> + <exclude>io.netty:netty-codec-redis</exclude> + <exclude>io.netty:netty-codec-socks</exclude> + <exclude>io.netty:netty-codec-stomp</exclude> <exclude>io.netty:netty-codec</exclude> <exclude>io.netty:netty-common</exclude> + <exclude>io.netty:netty-example</exclude> + <exclude>io.netty:netty-handler-proxy</exclude> <exclude>io.netty:netty-handler</exclude> + <exclude>io.netty:netty-resolver-dns</exclude> <exclude>io.netty:netty-resolver</exclude> + <exclude>io.netty:netty-tcnative</exclude> + <exclude>io.netty:netty-transport-rxtx</exclude> + <exclude>io.netty:netty-transport-sctp</exclude> + <exclude>io.netty:netty-transport-udt</exclude> <exclude>io.netty:netty-transport</exclude> + + <exclude>log4j:log4j</exclude> + <exclude>net.jpountz.lz4:lz4</exclude> + <exclude>org.apache.logging.log4j:log4j-api</exclude> + <exclude>org.bouncycastle:bcpkix-jdk15on</exclude> + <exclude>org.bouncycastle:bcprov-jdk15on</exclude> + <exclude>org.codehaus.mojo:animal-sniffer-annotations</exclude> + <exclude>org.javassist:javassist</exclude> + <exclude>org.jboss.marshalling:jboss-marshalling</exclude> + <exclude>org.jctools:jctools-core</exclude> + <exclude>org.rxtx:rxtx</exclude> + <exclude>org.slf4j:slf4j-api</exclude> </excludes> </artifactSet> </configuration> </execution> </executions> </plugin> + <!--Now unpack the shaded jar made above so the shaded classes are available to subsequent modules--> <plugin>
