From f13c7f8f7dc8766b0a42406b5c3639d6be55cf33 Mon Sep 17 00:00:00 2001 From: Josh Rosen <joshrosen@databricks.com> Date: Mon, 11 Jan 2016 00:31:29 -0800 Subject: [PATCH] [SPARK-12734][HOTFIX][TEST-MAVEN] Fix bug in Netty exclusions This is a hotfix for a build bug introduced by the Netty exclusion changes in #10672. We can't exclude `io.netty:netty` because Akka depends on it. There's not a direct conflict between `io.netty:netty` and `io.netty:netty-all`, because the former puts classes in the `org.jboss.netty` namespace while the latter uses the `io.netty` namespace. However, there still is a conflict between `org.jboss.netty:netty` and `io.netty:netty`, so we need to continue to exclude the JBoss version of that artifact. While the diff here looks somewhat large, note that this is only a revert of a some of the changes from #10672. You can see the net changes in pom.xml at https://github.com/apache/spark/compare/3119206b7188c23055621dfeaf6874f21c711a82...5211ab8#diff-600376dffeb79835ede4a0b285078036 Author: Josh Rosen <joshrosen@databricks.com> Closes #10693 from JoshRosen/netty-hotfix. --- dev/deps/spark-deps-hadoop-2.2 | 1 + dev/deps/spark-deps-hadoop-2.3 | 1 + dev/deps/spark-deps-hadoop-2.4 | 1 + dev/deps/spark-deps-hadoop-2.6 | 1 + examples/pom.xml | 4 --- pom.xml | 50 +++++----------------------------- 6 files changed, 11 insertions(+), 47 deletions(-) diff --git a/dev/deps/spark-deps-hadoop-2.2 b/dev/deps/spark-deps-hadoop-2.2 index 13d1b0e950..e4373f79f7 100644 --- a/dev/deps/spark-deps-hadoop-2.2 +++ b/dev/deps/spark-deps-hadoop-2.2 @@ -142,6 +142,7 @@ metrics-graphite-3.1.2.jar metrics-json-3.1.2.jar metrics-jvm-3.1.2.jar minlog-1.2.jar +netty-3.8.0.Final.jar netty-all-4.0.29.Final.jar objenesis-1.2.jar opencsv-2.3.jar diff --git a/dev/deps/spark-deps-hadoop-2.3 b/dev/deps/spark-deps-hadoop-2.3 index d7deaa0a24..7478181406 100644 --- a/dev/deps/spark-deps-hadoop-2.3 +++ b/dev/deps/spark-deps-hadoop-2.3 @@ -133,6 +133,7 @@ metrics-json-3.1.2.jar metrics-jvm-3.1.2.jar minlog-1.2.jar mx4j-3.0.2.jar +netty-3.8.0.Final.jar netty-all-4.0.29.Final.jar objenesis-1.2.jar opencsv-2.3.jar diff --git a/dev/deps/spark-deps-hadoop-2.4 b/dev/deps/spark-deps-hadoop-2.4 index 7ad2212ed5..faffb8bf39 100644 --- a/dev/deps/spark-deps-hadoop-2.4 +++ b/dev/deps/spark-deps-hadoop-2.4 @@ -134,6 +134,7 @@ metrics-json-3.1.2.jar metrics-jvm-3.1.2.jar minlog-1.2.jar mx4j-3.0.2.jar +netty-3.8.0.Final.jar netty-all-4.0.29.Final.jar objenesis-1.2.jar opencsv-2.3.jar diff --git a/dev/deps/spark-deps-hadoop-2.6 b/dev/deps/spark-deps-hadoop-2.6 index 7f8518927a..e703c7acd3 100644 --- a/dev/deps/spark-deps-hadoop-2.6 +++ b/dev/deps/spark-deps-hadoop-2.6 @@ -140,6 +140,7 @@ metrics-json-3.1.2.jar metrics-jvm-3.1.2.jar minlog-1.2.jar mx4j-3.0.2.jar +netty-3.8.0.Final.jar netty-all-4.0.29.Final.jar objenesis-1.2.jar opencsv-2.3.jar diff --git a/examples/pom.xml b/examples/pom.xml index 6013085b10..1a0d5e5854 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -111,10 +111,6 @@ <groupId>org.jruby</groupId> <artifactId>jruby-complete</artifactId> </exclusion> - <exclusion> - <groupId>io.netty</groupId> - <artifactId>netty</artifactId> - </exclusion> </exclusions> </dependency> <dependency> diff --git a/pom.xml b/pom.xml index cbed36c1ea..06cccf1df0 100644 --- a/pom.xml +++ b/pom.xml @@ -519,12 +519,6 @@ <groupId>${akka.group}</groupId> <artifactId>akka-remote_${scala.binary.version}</artifactId> <version>${akka.version}</version> - <exclusions> - <exclusion> - <groupId>io.netty</groupId> - <artifactId>netty</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> <groupId>${akka.group}</groupId> @@ -768,10 +762,6 @@ <groupId>org.jboss.netty</groupId> <artifactId>netty</artifactId> </exclusion> - <exclusion> - <groupId>io.netty</groupId> - <artifactId>netty</artifactId> - </exclusion> </exclusions> </dependency> <dependency> @@ -832,10 +822,6 @@ <groupId>junit</groupId> <artifactId>junit</artifactId> </exclusion> - <exclusion> - <groupId>io.netty</groupId> - <artifactId>netty</artifactId> - </exclusion> </exclusions> </dependency> <dependency> @@ -936,10 +922,6 @@ <groupId>org.jboss.netty</groupId> <artifactId>netty</artifactId> </exclusion> - <exclusion> - <groupId>io.netty</groupId> - <artifactId>netty</artifactId> - </exclusion> <exclusion> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> @@ -964,10 +946,6 @@ <groupId>org.jboss.netty</groupId> <artifactId>netty</artifactId> </exclusion> - <exclusion> - <groupId>io.netty</groupId> - <artifactId>netty</artifactId> - </exclusion> <exclusion> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> @@ -997,10 +975,6 @@ <groupId>org.jboss.netty</groupId> <artifactId>netty</artifactId> </exclusion> - <exclusion> - <groupId>io.netty</groupId> - <artifactId>netty</artifactId> - </exclusion> <exclusion> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> @@ -1029,10 +1003,6 @@ <groupId>org.jboss.netty</groupId> <artifactId>netty</artifactId> </exclusion> - <exclusion> - <groupId>io.netty</groupId> - <artifactId>netty</artifactId> - </exclusion> <exclusion> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> @@ -1061,10 +1031,6 @@ <groupId>org.jboss.netty</groupId> <artifactId>netty</artifactId> </exclusion> - <exclusion> - <groupId>io.netty</groupId> - <artifactId>netty</artifactId> - </exclusion> <exclusion> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> @@ -1085,10 +1051,6 @@ <groupId>org.jboss.netty</groupId> <artifactId>netty</artifactId> </exclusion> - <exclusion> - <groupId>io.netty</groupId> - <artifactId>netty</artifactId> - </exclusion> </exclusions> </dependency> <dependency> @@ -1832,13 +1794,15 @@ </requireJavaVersion> <bannedDependencies> <excludes> - <exclude>io.netty:netty</exclude> + <!-- + Akka depends on io.netty:netty, which puts classes under the org.jboss.netty + package. This conflicts with the classes in org.jboss.netty:netty + artifact, so we have to ban that artifact here. In Netty 4.x, the classes + are under the io.netty package, so it's fine for us to depend on both + io.netty:netty and io.netty:netty-all. + --> <exclude>org.jboss.netty</exclude> </excludes> - <includes> - <!-- Required by Flume sink tests --> - <include>io.netty:netty:3.4.0.Final:*:test</include> - </includes> <searchTransitive>true</searchTransitive> </bannedDependencies> </rules> -- GitLab