Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6667

Hint at Maven upgrade requirement when trying to build a pom.xml with a newer modelVersion

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.2
    • Component/s: core

      Description

      In order to allow us to bump the modelVersion for building we need Maven to alert users about the updated building requirements.

      NOTE: We will always need to deploy a modelVersion 4.0.0 pom.xml so that consumers can consume dependencies, but we can build with a newer model version and produce the corresponding modelVersion 4.0.0 pom.xml for deployment (this would be flattened so that it has no parent). The build pom only needs to be deployed if it is being used as a parent, in which case:

      • The pom using it as a parent will have to have a newer or same modelVersion as its parent

      On that basis we can either

      • Deploy the newer modelVersion parent pom with a classifier and its 4.0.0 (best-effort) equivalent without a classifier, then when building the child, we look for the parent with classifier and only if missing do we fall back to look for a modelVersion 4.0.0 parent.
      • Deploy the newer modelVersion parent pom as normal, since you need to have a newer modelVersion to be a child and we only deploy flattened 4.0.0 compatibility poms for the children, no legacy consumer will ever have to parse the parent

      Determination of which of these two approaches to use is out of scope for this issue.

        Attachments

          Activity

            People

            • Assignee:
              stephenc Stephen Connolly
              Reporter:
              stephenc Stephen Connolly
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: