[
https://issues.apache.org/jira/browse/FLINK-9091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16495039#comment-16495039
]
ASF GitHub Bot commented on FLINK-9091:
---------------------------------------
GitHub user zentol opened a pull request:
https://github.com/apache/flink/pull/6102
[FLINK-9091][build] Dependency convergence run against dependency-red…
## What is the purpose of the change
As outlined in the JIRA the enforcer-plugin may not always work against
dependency-reduced poms leading to convergence failures. This heavily conflicts
with our approach to shading dependencies.
This PR ensures that the dependency-convergence , at least on travis, is
run against dependency-reduced poms.
The easiest way to achieve this is to run the enforcer plugin separately
for each leaf module, for which maven works against the local repository, and
thus dependency-reduced poms.
Naturally this cannot be nicely modeled into the maven life-cycle, hence we
rely on a bash script to iterate over all modules.
To prevent other devs from running into this problem the enforcer plugin is
now disabled by default. It must be explicitly enabled with a profile. To check
the convergence locally one may use `tools/check_dependency_convergence.sh`.
This PR subsumes #6073.
## Brief change log
* disable enforcer by default
* add profile to enable enforcer
* add `tools/check_dependency_convergence.sh` script to run convergence
check against dependency-reduced poms
* modify travis scripts to run convergence check after compilation
## Verifying this change
* add a dependency-convergence violation and run on travis; optionally run
script locally
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zentol/flink 9091
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/6102.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 #6102
----
commit 6f2eb68d785b88de36d7eb6e0d48d487e8a7a811
Author: zentol <chesnay@...>
Date: 2018-05-28T13:10:53Z
[FLINK-9091][build] Dependency convergence run against dependency-reduced
poms
----
> Failure while enforcing releasability in building flink-json module
> -------------------------------------------------------------------
>
> Key: FLINK-9091
> URL: https://issues.apache.org/jira/browse/FLINK-9091
> Project: Flink
> Issue Type: Bug
> Components: Build System
> Reporter: Ted Yu
> Assignee: Hai Zhou
> Priority: Major
> Attachments: f-json.out
>
>
> Got the following when building flink-json module:
> {code}
> [WARNING] Rule 0: org.apache.maven.plugins.enforcer.DependencyConvergence
> failed with message:
> Failed while enforcing releasability. See above detailed error message.
> ...
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce
> (dependency-convergence) on project flink-json: Some Enforcer rules have
> failed. Look above for specific messages explaining why the rule failed. ->
> [Help 1]
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)