GitHub user JoshRosen opened a pull request:
https://github.com/apache/spark/pull/10672
[SPARK-12734][BUILD] Fix Netty exclusion and use Maven Enforcer to prevent
future bugs
Netty classes are published under artifacts with different names, so our
build needs to exclude the `io.netty` and `org.jboss.netty` versions of the
Netty artifact. However, our existing exclusions were incomplete, leading to
situations where duplicate Netty classes would wind up on the classpath and
cause compile errors (or worse).
This patch fixes the exclusion issue by adding more exclusions and uses
Maven Enforcer's [banned
dependencies](https://maven.apache.org/enforcer/enforcer-rules/bannedDependencies.html)
rule to prevent these classes from accidentally being reintroduced. I also
updated `dev/test-dependencies.sh` to run `mvn validate` so that the enforcer
rules can run as part of pull request builds.
/cc @rxin @srowen @pwendell. I'd like to backport at least the exclusion
portion of this fix to `branch-1.5` in order to fix the documentation
publishing job, which fails nondeterministically due to incompatible versions
of Netty classes taking precedence on the compile-time classpath.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/JoshRosen/spark enforce-netty-exclusions
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/10672.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #10672
----
commit f2e7a3fb46caee8537755a05e8371fcf8dfd6103
Author: Josh Rosen <[email protected]>
Date: 2016-01-09T04:50:39Z
Enforce Netty exclusions.
commit 64ce63624d07750c24fc5aaa4329bc1958c95f78
Author: Josh Rosen <[email protected]>
Date: 2016-01-09T06:09:42Z
Add more exclusions and includes.
commit 798441ae25936f61c431c01a3d5d3578dd8442c9
Author: Josh Rosen <[email protected]>
Date: 2016-01-09T06:19:01Z
Add even more excludes; run mvn validate in deps test script.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]