Hi,
It's a great feature.
I didn't check all the code but I would say maybe there should be some
warning (or prompt to ask user) about something (here a jdk) will be
installed on the current machine.
Perso, I wouldn't be happy about a jdk being installed locally without
my consent.
I did some tests and nothing tells me anything and suddenly I can see
I have something which was downloaded to
/Users/olamy/.m2/wrapper/jdks/jdk-17-temurin.
Not sure if we should have some automatic download per default without
asking the user.
We can imagine some -D or env var to override it but I'm not sure
about the per default downloading.
Even better display the usage license of the product. I had a quick
look at Foojay Disco API and can't really find that in their API's
response so maybe not possible for now.

On Thu, 24 Jul 2025 at 04:46, Guillaume Nodet <gno...@apache.org> wrote:
>
> Hi Maven team,
>
> I'd like to request a review for a new Maven Wrapper enhancement that adds
> automatic JDK download capabilities.
>
> PR Details:  https://github.com/apache/maven-wrapper/pull/337
>
> This enhancement integrates the Foojay Disco API to automatically download
> and install JDKs when they're not available locally. This is an opt-in
> feature - existing wrapper behavior remains unchanged unless users
> explicitly configure JDK properties.
>
> Key Features:
>
>    - Opt-in only: No behavior change for existing projects
>    - Automatic JDK download using Foojay Disco API
>    - Support for major versions (e.g., jdk=17) and specific versions
>    - Cross-platform compatibility (Linux, macOS, Windows)
>
> Example Usage:
>
> # In .mvn/wrapper/maven-wrapper.properties
> maven=3.9.6
> jdk=17
> jdk_distro=temurin
>
>
> The implementation would significantly improve the Maven Wrapper user
> experience by eliminating manual JDK setup steps for teams that choose to
> use it.
>
> Looking forward to your feedback!
>
> Best regards,
> Guillaume Nodet

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to