You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update JDK_MANAGEMENT.md to reflect only-script implementation
Fix documentation to accurately describe the shell-based JDK management:
✅ Documentation Updates:
- Clarify that JDK management is only available for 'only-script' distribution type
- Remove references to removed Java classes (JdkResolver, JdkDownloader, etc.)
- Update all Maven plugin examples to include -Dtype=only-script
- Explain shell-based implementation architecture
- Add distribution type requirement to migration guide
✅ Key Changes:
- Replace Java class references with shell script implementation details
- Emphasize SDKMAN API integration via curl/wget and PowerShell
- Highlight chicken-and-egg problem solution
- Update all command examples to be accurate
- Add clear migration instructions
The documentation now accurately reflects the shell-based implementation
and makes it clear that JDK management requires the only-script distribution type.
Copy file name to clipboardExpand all lines: src/site/markdown/JDK_MANAGEMENT.md
+38-20Lines changed: 38 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,11 @@
17
17
18
18
# JDK Management in Maven Wrapper
19
19
20
-
This document describes the enhanced JDK management capabilities added to Maven Wrapper, allowing projects to automatically download and manage JDK installations.
20
+
This document describes the enhanced JDK management capabilities added to Maven Wrapper for the `only-script` distribution type, allowing projects to automatically download and manage JDK installations.
21
21
22
22
## Overview
23
23
24
-
The Maven Wrapper now supports:
24
+
The Maven Wrapper `only-script` distribution now supports:
25
25
26
26
- 🚀 **Automatic JDK download and installation**
27
27
- 📦 **JDK version management via maven-wrapper.properties**
@@ -31,6 +31,17 @@ The Maven Wrapper now supports:
31
31
- ⚙️ **Environment variable configuration**
32
32
- ↩️ **Backward compatibility with existing configurations**
33
33
34
+
## Distribution Type Support
35
+
36
+
**Important**: JDK management is **only available for the `only-script` distribution type**. This design choice avoids the chicken-and-egg problem where Java is needed to download Java.
The `only-script` distribution uses shell scripts (Unix) and PowerShell (Windows) to handle JDK download and installation directly, without requiring Java to be pre-installed.
-**BinaryDownloader**: Generic binary download and extraction
291
+
-**Shell Scripts**: `only-mvnw` (Unix/Linux/macOS) and `only-mvnw.cmd` (Windows)
292
+
-**SDKMAN API Integration**: Direct HTTP calls using `curl`/`wget` and PowerShell
293
+
-**Version Resolution**: Major version (17) → Latest patch version (17.0.14)
294
+
-**Archive Extraction**: Native `tar`/`unzip` commands with cross-platform support
295
+
-**Toolchain Integration**: Direct XML manipulation for `~/.m2/toolchains.xml`
278
296
279
-
These components work together to provide a seamless JDK management experience while maintaining the simplicity and reliability of Maven Wrapper.
297
+
This shell-based approach avoids the chicken-and-egg problem of needing Java to download Java, providing a self-contained solution that works without any Java runtime pre-installed.
0 commit comments