Skip to content

[MTOOLCHAINS-62] Allow specifying a preferred version range for the JDK #73

@jira-importer

Description

@jira-importer

Juan Farré opened MTOOLCHAINS-62 and commented

As a user of the plugin, I would like to be able to specify a preferred version range for the JDK when using the select-jdk-toolchain goal.

Currently, it's possible to specify an absolute version range (no JDK will be selected outside of it).

Let's say my project is designed for Java 17. Now imagine two users:

User A has two JDKs with versions 17 and 21.

User B has a JDK version 21.

If I specify the range [17,), the JDK 21 will be selected for user A, while I would prefer the exact match.

If I specify the range [17,18), this will be too restrictive for user B, who must install an additional JDK.

I want to be able to specify the range [17,) and then also a preferred range of [17,28). It could be the first criterion in the comparator to select an autodetected JDK.

With this setup, JDK 17 would be selected for user A and JDK 21 for user B.

This may also be an interesting feature for the toolchain goal.


Affects: 3.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority:minorMinor loss of function, or other problem where easy workaround is present

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions