Skip to content

[MENFORCER-444] Improve error message for rule "requireJavaVersion" #571

Closed

Description

@jira-importer

Konrad Windszus opened MENFORCER-444 and commented

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).


Affects: 3.1.0

Issue Links:

  • MENFORCER-479 Version enforcer rules print single versions when a range is expected

Remote Links:

Backported to: 3.2.0

Activity

  1. jira-importer commented on Jan 7, 2023

    @jira-importer
    Author

    Konrad Windszus commented

    Fixed in 49ff49a.

  2. added
    enhancement
    priority:major
    on Jun 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementpriority:major

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions