GitHub user StephanEwen opened a pull request: https://github.com/apache/flink/pull/3029
[FLINK-5369] [build] Set jsr305 and logging dependencies to 'provided' by default. Currently, every project in Flink has a hard (compile scope) dependency on the `jsr305`, `slf4j`, `log4j`, and `commons-land3` artifacts. That way they are pulled into every fat jar, including user fat jars as soon as they refer to a connector or library. This commit sets these dependencies to 'provided' in the root pom file. That means every project can refer to those classes, but should never re-bundle them (instead assume they are present already). To make the classes end up in the class path for local executions, they are added only to the `flink-core` project as actual (compile scope) dependencies. Connectors and libraries that refer to `flink-core` as provided actually treat those dependencies in the same way. ### Looking Forward Ideally, no Flink project should directly reference a concrete logging framework (like log4j), but only `flink-dist` should add this to the `lib` directory. That way the logging framework is perfectly pluggable for everyone that references Flink projects (today it needs explicit exclusion of the log4j dependency). The quickstarts and tests should also pull in a default logging framework, to enable local logging. This pull request prepares that, but still keeps `log4j` in the classpath of `flink-core` (as before) to not break any existing Flink projects (based on prior quickstarts) executing in the IDE. You can merge this pull request into a Git repository by running: $ git pull https://github.com/StephanEwen/incubator-flink shade Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3029.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 #3029 ---- commit be32c4e0f72e56a32ca81c96658c17b09fb73300 Author: Stephan Ewen <se...@apache.org> Date: 2016-12-19T15:24:29Z [FLINK-5369] [build] Set jsr305 and logging dependencies to 'provided' by default. Currently, every project in Flink has a hard (compile scope) dependency on the jsr305, slf4j, and log4j artifacts. That way they are pulled into every fat jar, including user fat jars as soon as they refer to a connector or library. This commit sets jsr305 and slf4j to 'provided' in the root pom file. That means every project can refer to those classes, but should never re-bundle them (instead assume they are present already). That is achieved by adding them only to the 'flink-core' project as actualy (compile scope) 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---