You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Christian Schulte <cs...@schulte.it> on 2016/08/13 18:39:03 UTC

Dependency management import conflict resolution

Hi,

currently the 'DefaultDependencyManagementImporter' does some kind of
conflict resolution by only importing dependencies not already declared
in the model. When working on MNG-5971, I introduced a warning to make
users aware of what is happening behind the scenes. I was asked to
revert those warnings. The commit reverting the warnings is this:

<https://git-wip-us.apache.org/repos/asf?p=maven.git;a=commitdiff;h=4ae1673484c66e6125a91463cb517237933a3437>

The warning message pattern would have been:
"Multiple conflicting imports of dependency '%1$s' into model
'%2$s'%3$s(%4$s). To resolve this conflict, either declare the
dependency directly in model '%2$s' to override what gets imported or
rearrange the causing imports in the inheritance hierarchy to apply
standard override logic. Without resolving this conflict, your build
relies on indeterministic behaviour."

I really would like to re-add those warnings. See the comments @MNG-5971
starting at 23/Feb/16 13:35
<https://issues.apache.org/jira/browse/MNG-5971?focusedCommentId=15158868&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15158868>.
Re-order the dependency declarations in the XML and get a different
effective model without noticing. Should we warn about it, or leave
things the way they are? I really think such kind of conflicts need to
be resolved manually. It's the same as adding redundant dependency
declarations into the POM directly. Maven would warn about that <3.4 and
would error out >=3.4. The number of warnings Maven would print would be
huge for a lot of projects.

Regards,
-- 
Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org