Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/1813#discussion_r15909412
--- Diff: pom.xml ---
@@ -249,6 +249,7 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>14.0.1</version>
+ <scope>provided</scope>
--- End diff --
Well, this is kind of a problem with the scopes in maven and the way things
are generally distributed...
For libraries, I believe all dependencies should be "provided". So
commons-math and all others should, in my view, also be provided. Of course I
won't make that change here.
When you package libraries into an app (which is the case of the uber-jars,
meant to be distributed in a cluster), then you need to package those
dependencies. In maven that generally means making them "compile" scope.
For a pure library, you wouldn't have this packaging step; that would be
done by the users of the library.
Leaving the library with a compile-scope dependency means you'll run into
all the issues I pointed out in the bug:
- people will depend on the transitive dependency
- at some point they might want to update the version
- and at that point things will fail if they forget to package the new
dependency
So this change solves that problem for Guava. If you use it, you have to
explicitly declare and package it. For others, I'll leave it for the time when
people decide to tackle other dependencies (I explicitly created a sub-task for
Guava to avoid having to deal with other dependencies).
---
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]