flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-5369) jsr305 and logging dependencies should be 'provided' by default
Date Mon, 19 Dec 2016 17:23:58 GMT

    [ https://issues.apache.org/jira/browse/FLINK-5369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15761749#comment-15761749
] 

ASF GitHub Bot commented on FLINK-5369:
---------------------------------------

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 <sewen@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.

----


> jsr305 and logging dependencies should be 'provided' by default
> ---------------------------------------------------------------
>
>                 Key: FLINK-5369
>                 URL: https://issues.apache.org/jira/browse/FLINK-5369
>             Project: Flink
>          Issue Type: Bug
>          Components: Build System
>            Reporter: Stephan Ewen
>            Assignee: Stephan Ewen
>             Fix For: 1.2.0
>
>
> Currently, every project in Flink has a hard (compile scope) dependency on the {{jsr305}},
{{slf4j}}, {{log4j}}, and {{commons-land3}} artifacts, because these dependencies are declared
in the root pom.xml. That way they are pulled into every fat jar, including user fat jars
as soon as they refer to a connector or library.
>     
> We should set jsr305, slf4j, log4j, etc 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 actual (compile scope) dependencies.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message