Skip to content

MENFORCER-195 - use DependencyGraphBuilder API instead of DependencyTreeBuilder#20

Closed
ctomc wants to merge 1 commit intoapache:trunkfrom
ctomc:enforcer-wildcards
Closed

MENFORCER-195 - use DependencyGraphBuilder API instead of DependencyTreeBuilder#20
ctomc wants to merge 1 commit intoapache:trunkfrom
ctomc:enforcer-wildcards

Conversation

@ctomc
Copy link
Copy Markdown

@ctomc ctomc commented Nov 14, 2016

Using this I get enforcer to work with wildcard exclusion without any issue.
as a bonus ban bad dependencies rule also gets much faster (0.5sec vs 15sec) in our case.
Initial issue that was mentioned in MENFORCER-195 was somewhat fixed as part of work on MDEP-374 so it is safe to use new API.

@Tunaki
Copy link
Copy Markdown

Tunaki commented Nov 17, 2016

The DependencyGraphBuilder component still does not handle omitted nodes. This is tracked in MSHARED-339 and is not resolved yet. This change is thus breaking some ITs for now.

@ctomc
Copy link
Copy Markdown
Author

ctomc commented Nov 21, 2016

From what I tried it looks like the fix for https://issues.apache.org/jira/browse/MDEP-374 handled that fine.
But to be fair, I did test only with latest released versions of maven and dependency plugin.

Also tests on our codebase showed that duplicate deps ware found as expected.

Can you point me to ITs this breaking?

@Tunaki
Copy link
Copy Markdown

Tunaki commented Nov 21, 2016

Yes, you can build the maven-enforcer project and run its ITs with mvn clean verify -Prun-its. I ran them with Maven 3.3.9 and there were 6 failing ITs (after fixing small checkstyle issues):

[ERROR] *  dependencies_not_converging\pom.xml
[ERROR] *  dependencies_not_converging_test_scope\pom.xml
[ERROR] *  require-upper-bound-dependencies-managed_failure\pom.xml
[ERROR] *  require-upper-bound-dependencies-unique_failure\pom.xml
[ERROR] *  require-upper-bound-dependencies-unique_success\pom.xml
[ERROR] *  require-upper-bound-deps_failure\pom.xml

Version 3.0 of the maven-dependency-tree shared component is Maven 3 specific and the plugin isn't migrated to it yet, so we stick to 2.2. But even with 3.0, I don't think it'll solve the issue, the Dependency Plugin also doesn't support verbose currently (which would show omitted nodes).

@jira-importer
Copy link
Copy Markdown

Resolve #692

1 similar comment
@jira-importer
Copy link
Copy Markdown

Resolve #692

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants