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

RequirePluginVersions broken with "CI Friendly versions"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.4.1, 3.0.0-M1
    • 3.0.0-M2, 3.0.0-M3
    • Standard Rules
    • None

    Description

      Maven 3.5.0 introduced CI friendly versions.

      However when used with multi module project the enforcer fails the build as it can not resolve the parent.

      The bug is that the parent resolution of a module in the reactor is attempting to use the untransposed version.

      e.g.

      INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (display-info) @ sub-module ---
      [WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequirePluginVersions failed with message:
      Failure to find com.acme.product:parent:pom:0.9.8-${revision}SNAPSHOT in https://repo.acme.com/content/groups/all was cached in the local repository, resolution will not be reattempted until the update interval of acme-internal has elapsed or updates are forced
      
        com.acme.product:parent:pom:0.9.8-${revision}SNAPSHOT
      
      from the specified remote repositories:
        acme-internal (https://repo.acme.com/content/groups/all, releases=true, snapshots=true)
      
      

      to reproduce create a new multi module project as per the linked page above. Add the enforcer plugin and rule to the build

      run mvn -Drevision=1.2.3-SNAPSHOT and watch the build fail.

      Attachments

        Issue Links

          Activity

            People

              khmarbaise Karl Heinz Marbaise
              jnord_cbs James Nord
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m