Uploaded image for project: 'Maven Enforcer Plugin'
  1. Maven Enforcer Plugin
  2. MENFORCER-466

RequireUpperBoundDeps fails on provided dependencies since 3.2.1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.1
    • 3.3.0
    • requireUpperBoundDeps
    • None
    • Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
      Java version: 1.8.0_352, vendor: Temurin

    Description

      The attached pom.xml works fine for

      mvn enforcer:enforce -Dversion.maven-enforcer-plugin=3.1.0 

      but 

      mvn enforcer:enforce -Dversion.maven-enforcer-plugin=3.2.1 

      fails with

      Rule 0: org.apache.maven.enforcer.rules.dependency.RequireUpperBoundDeps failed with message:
      Failed while enforcing RequireUpperBoundDeps. The error(s) are [
      Require upper bound dependencies error for org.apache.maven:maven-model:3.8.5 [provided] paths to dependency are:
      +-com.canda.maven:mvnbase-maven-plugin:1.0.0-local-SNAPSHOT
        +-org.apache.maven:maven-plugin-api:3.8.5 [provided]
          +-org.apache.maven:maven-model:3.8.5 [provided]
      and
      +-com.canda.maven:mvnbase-maven-plugin:1.0.0-local-SNAPSHOT
        +-org.apache.maven:maven-core:3.8.7 [provided]
          +-org.apache.maven:maven-model:3.8.7 [provided]
      and
      +-com.canda.maven:mvnbase-maven-plugin:1.0.0-local-SNAPSHOT
        +-org.apache.maven:maven-core:3.8.7 [provided]
          +-org.apache.maven:maven-model-builder:3.8.7 [provided]
            +-org.apache.maven:maven-model:3.8.7 [provided]
      and
      +-com.canda.maven:mvnbase-maven-plugin:1.0.0-local-SNAPSHOT
        +-org.apache.maven:maven-core:3.8.7 [provided]
          +-org.apache.maven:maven-resolver-provider:3.8.7 [provided]
            +-org.apache.maven:maven-model:3.8.7 [provided] 

      Similar to dependencyConvergence ( https://issues.apache.org/jira/browse/MENFORCER-407?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&focusedCommentId=17683326#comment-17683326 ) the updated plugin

      seems to check "<scope>provided</scope>" dependencies for upperBounds.

      All provided dependencies (at least the transitive ones?) needs to be ignored by RequireUpperBoundDeps.

      Attachments

        1. console-3.2.1.txt
          7 kB
          Stefan Cordes
        2. console-3.1.0.txt
          1 kB
          Stefan Cordes
        3. pom.xml
          2 kB
          Stefan Cordes

        Activity

          People

            sjaranowski Slawomir Jaranowski
            ca-stefan-cordes Stefan Cordes
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: