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)