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

   Realms were created with a `null` base, which only reaches the bootstrap 
loader, so `ServiceLoader` with a realm as context class loader could not see 
JDK providers in platform modules. JNDI then falls back to reflective 
instantiation and fails, for example `IllegalAccessException` for 
`com.sun.jndi.dns.DnsContextFactory` when Netty's DNS resolver runs in a plugin 
on Windows 
([plexus-classworlds#119](https://github.com/codehaus-plexus/plexus-classworlds/issues/119)).
   
   With the platform loader as base, packages from JDK platform modules 
(`javax.sql`, `javax.transaction.xa`, `javax.tools`, `javax.lang.model`) now 
take precedence over copies a plugin bundles, the same order a plain `java` 
launch gives them. `jdk.compiler` is defined by the application loader and is 
unaffected.
   
   Verified: the new `DefaultClassRealmManagerTest` case fails without the 
change and passes with it; `maven-core` tests pass on JDK 21. Core ITs not run 
locally.
   


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