You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2022/12/19 08:37:00 UTC

[jira] [Created] (MENFORCER-444) Improve error message for rule "requireJava"

Konrad Windszus created MENFORCER-444:
-----------------------------------------

             Summary: Improve error message for rule "requireJava"
                 Key: MENFORCER-444
                 URL: https://issues.apache.org/jira/browse/MENFORCER-444
             Project: Maven Enforcer Plugin
          Issue Type: Improvement
          Components: Standard Rules
    Affects Versions: 3.1.0
            Reporter: Konrad Windszus


When a single version is given as value for configuration {{version}} in rule [requireJavaVersion|https://maven.apache.org/enforcer/enforcer-rules/requireJavaVersion.html] the following error message might be emitted:

{code}
....
[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.
...
{code}

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



--
This message was sent by Atlassian Jira
(v8.20.10#820010)