Skip to content

Commit 183c64d

Browse files
committed
RATIS-47. Shade google guava, and combine ratis-netty-shaded with ratis-proto-shaded. Contributed by Tsz Wo Nicholas Sze.
1 parent f970468 commit 183c64d

File tree

10 files changed

+357
-532
lines changed

10 files changed

+357
-532
lines changed

pom.xml

+7-12
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
<module>ratis-hadoop</module>
5353
<module>ratis-hadoop-shaded</module>
5454
<module>ratis-netty</module>
55-
<module>ratis-netty-shaded</module>
5655
<module>ratis-proto-shaded</module>
5756
<module>ratis-server</module>
5857
</modules>
@@ -145,6 +144,7 @@
145144
<maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
146145
<maven-javadoc-plugin.version>2.10.3</maven-javadoc-plugin.version>
147146
<maven-resources-plugin.version>2.6</maven-resources-plugin.version>
147+
<maven-shade-plugin.version>2.4.3</maven-shade-plugin.version>
148148
<maven-site-plugin.version>3.5</maven-site-plugin.version>
149149
<maven-source-plugin.version>2.3</maven-source-plugin.version>
150150
<maven-stylus-skin.version>1.5</maven-stylus-skin.version>
@@ -263,11 +263,6 @@
263263
<type>test-jar</type>
264264
<scope>test</scope>
265265
</dependency>
266-
<dependency>
267-
<artifactId>ratis-netty-shaded</artifactId>
268-
<groupId>org.apache.ratis</groupId>
269-
<version>${project.version}</version>
270-
</dependency>
271266

272267
<dependency>
273268
<artifactId>ratis-proto-shaded</artifactId>
@@ -300,12 +295,6 @@
300295
<version>1.7.10</version>
301296
</dependency>
302297

303-
<dependency>
304-
<groupId>com.google.guava</groupId>
305-
<artifactId>guava</artifactId>
306-
<version>20.0</version>
307-
</dependency>
308-
309298
<dependency>
310299
<groupId>junit</groupId>
311300
<artifactId>junit</artifactId>
@@ -316,6 +305,12 @@
316305
<artifactId>mockito-all</artifactId>
317306
<version>1.8.5</version>
318307
</dependency>
308+
309+
<dependency>
310+
<groupId>org.jctools</groupId>
311+
<artifactId>jctools-core</artifactId>
312+
<version>1.2.1</version>
313+
</dependency>
319314
</dependencies>
320315
</dependencyManagement>
321316

ratis-common/pom.xml

-5
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@
4343
<artifactId>slf4j-log4j12</artifactId>
4444
</dependency>
4545

46-
<dependency>
47-
<groupId>com.google.guava</groupId>
48-
<artifactId>guava</artifactId>
49-
</dependency>
50-
5146
<dependency>
5247
<groupId>junit</groupId>
5348
<artifactId>junit</artifactId>

ratis-common/src/main/java/org/apache/ratis/util/StringUtils.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
*/
1818
package org.apache.ratis.util;
1919

20-
import com.google.common.collect.Interner;
21-
import com.google.common.collect.Interners;
20+
import org.apache.ratis.shaded.com.google.common.collect.Interner;
21+
import org.apache.ratis.shaded.com.google.common.collect.Interners;
2222

2323
import java.io.PrintWriter;
2424
import java.io.StringWriter;

ratis-examples/pom.xml

-5
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,6 @@
110110
<scope>test</scope>
111111
<type>test-jar</type>
112112
</dependency>
113-
<dependency>
114-
<artifactId>ratis-netty-shaded</artifactId>
115-
<groupId>org.apache.ratis</groupId>
116-
<scope>provided</scope>
117-
</dependency>
118113

119114
<dependency>
120115
<groupId>org.slf4j</groupId>

ratis-grpc/pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,10 @@
8383
<artifactId>mockito-all</artifactId>
8484
<scope>test</scope>
8585
</dependency>
86+
87+
<dependency>
88+
<groupId>org.jctools</groupId>
89+
<artifactId>jctools-core</artifactId>
90+
</dependency>
8691
</dependencies>
8792
</project>

ratis-hadoop-shaded/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
<plugin>
134134
<groupId>org.apache.maven.plugins</groupId>
135135
<artifactId>maven-shade-plugin</artifactId>
136-
<version>2.4.3</version>
136+
<version>${maven-shade-plugin.version}</version>
137137
<executions>
138138
<execution>
139139
<phase>package</phase>

ratis-netty-shaded/.gitignore

-2
This file was deleted.

0 commit comments

Comments
 (0)