gnodet opened a new pull request, #13491:
URL: https://github.com/apache/maven/pull/13491

   ## Summary
   
   Load JLine JARs on the JPMS module-path (via `lib/modules/`) so Maven can 
use a targeted `--enable-native-access=org.jline.terminal.ffm,org.jline.nativ` 
instead of the broad `--enable-native-access=ALL-UNNAMED`.
   
   Requires #13490 (internalize plexus-classworlds / `module` directive in 
`Configurator`).
   
   ## Changes
   
   - **`m2.conf`** — add `module` directives for JLine JARs; they're loaded in 
a child `ModuleLayer` via `Configurator.createModuleLayer()` (PR A)
   - **`component.xml`** — add `lib/modules/` output directory for JLine JARs 
in the assembly
   - **`mvn`** — replace `--enable-native-access=ALL-UNNAMED` with targeted 
module names; add Java version guard (skip on JDKs < 11 that don't support the 
flag)  
   - **`mvn.cmd`** — same targeted native-access flags; guard `MAVEN_ARGS` from 
being forwarded to sub-commands (`--enc`, `--shell`, `--up`) matching Linux 
`mvn` behaviour
   - **`LICENSE.vm`** — update JLine license block
   - **`test-mvn-path-conversion.sh`** — test path conversion for the new 
`lib/modules/` directory
   
   ## Motivation
   
   `--enable-native-access=ALL-UNNAMED` is overly broad and triggers a JDK 
warning (`--enable-native-access=ALL-UNNAMED` is going away). JLine's FFM 
terminal and native libraries are the only consumers; targeting them precisely 
silences the warning while keeping native terminal support.
   
   Fixes #11028
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to