You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "subes (Jira)" <ji...@apache.org> on 2021/12/14 18:38:00 UTC
[jira] [Comment Edited] (MENFORCER-402) RequireUpperBoundDeps now follow scope provided transitive dependencies
[ https://issues.apache.org/jira/browse/MENFORCER-402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17459400#comment-17459400 ]
subes edited comment on MENFORCER-402 at 12/14/21, 6:37 PM:
------------------------------------------------------------
https://issues.apache.org/jira/browse/MENFORCER-394 fixed this by removing provided dependencies from the analysis. Please apply the same fix for the RequireUpperBoundDeps rule.
[~slachiewicz] made the fix there.
was (Author: subes):
https://issues.apache.org/jira/browse/MENFORCER-394 fixed this by removing provided dependencies from the analysis. Please apply the same fix for the RequireUpperBoundDeps rule.
> RequireUpperBoundDeps now follow scope provided transitive dependencies
> -----------------------------------------------------------------------
>
> Key: MENFORCER-402
> URL: https://issues.apache.org/jira/browse/MENFORCER-402
> Project: Maven Enforcer Plugin
> Issue Type: Bug
> Components: Plugin
> Affects Versions: 3.0.0
> Reporter: Thomas Mortagne
> Priority: Major
>
> I have a dependency on org.infinispan:infinispan-core:12.1.7.Final and upgrading to the enforcer plugin 3.0.0 suddenly made my module fail because infinispan-core have conflicting provided dependencies on javax.annotation-api:
> {noformat}
> Require upper bound dependencies error for javax.annotation:javax.annotation-api:1.3.1 [provided] paths to dependency are:
> +-org.xwiki.commons:xwiki-commons-cache-infinispan:13.9-SNAPSHOT
> +-org.infinispan:infinispan-core:12.1.7.Final
> +-javax.annotation:javax.annotation-api:1.3.1 [provided]
> and
> +-org.xwiki.commons:xwiki-commons-cache-infinispan:13.9-SNAPSHOT
> +-org.infinispan:infinispan-core:12.1.7.Final
> +-org.infinispan:infinispan-commons:12.1.7.Final
> +-javax.annotation:javax.annotation-api:1.3.1 [provided]
> and
> +-org.xwiki.commons:xwiki-commons-cache-infinispan:13.9-SNAPSHOT
> +-org.infinispan:infinispan-core:12.1.7.Final
> +-org.infinispan:infinispan-component-processor:12.1.7.Final [provided]
> +-javax.annotation:javax.annotation-api:1.3.1 [provided]
> and
> +-org.xwiki.commons:xwiki-commons-cache-infinispan:13.9-SNAPSHOT
> +-org.infinispan:infinispan-core:12.1.7.Final
> +-org.infinispan.protostream:protostream-types:4.4.1.Final
> +-javax.annotation:javax.annotation-api:1.3.2 [provided]
> and
> +-org.xwiki.commons:xwiki-commons-cache-infinispan:13.9-SNAPSHOT
> +-org.infinispan:infinispan-core:12.1.7.Final
> +-org.infinispan.protostream:protostream-processor:4.4.1.Final [provided]
> +-javax.annotation:javax.annotation-api:1.3.2 [provided]
> and
> +-org.xwiki.commons:xwiki-commons-cache-infinispan:13.9-SNAPSHOT
> +-org.infinispan:infinispan-core:12.1.7.Final
> +-org.infinispan:infinispan-commons:12.1.7.Final
> +-org.infinispan:infinispan-commons-jdk11:12.1.7.Final [provided]
> +-javax.annotation:javax.annotation-api:1.3.1 [provided]
> {noformat}
> It's not clear if this was done on purpose since I cannot find anything about that in the release note, but I might have missed it. Problem is that provided scope dependencies are not necessarily used at runtime (it's often used as a way to avoid making transitive a dependency you only need at build time) and adding an <exclusion> for a non-transitive dependency feels quite weird.
> At least if this is not a bug, it would be nice to make this behavior configurable.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)