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

Improve error message for rule "requireJavaVersion"

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.0
    • 3.2.0, 3.2.1
    • Standard Rules
    • None

    Description

      When a single version is given as value for configuration version in rule requireJavaVersion the following error message might be emitted:

      ....
      [INFO] --- maven-enforcer-plugin:3.1.0:enforce (enforce-java-version) @ parent ---
      [ERROR] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
      Detected JDK Version: 1.8.0-345 is not in the allowed range 11.
      ...
      

      This is confusing as 11 is not a range, instead the derived range "[11,)" should be emitted in the error message (maybe in addition to the actual value given in the config).

      Attachments

        Issue Links

          Activity

            People

              kwin Konrad Windszus
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: