From what I tested, ServiceLoader doesn't allow a custom classloading
scheme for named modules (step 1 of
http://download.java.net/java/jdk9/docs/api/java/util/ServiceLoader.html#load-java.lang.Class-java.lang.ClassLoader-).
Its own scheme relies on checking modules loaded by the given
classloader, then its parents (with a particular rule with regard to
module layers), and it doesn't look like customizable. It also seems
that existing META-INF/services declarations, but located in named
modules, are ignored. For unnamed modules, or when something other than
ServiceLoader is used, everything is apparently the same as before in
Java 9.
This is why I think a plugin wouldn't be able to locate providers in a
module loaded by Maven core extension classloader: parent of the plugin
realm is bootstrap classloader directly.
Guillaume
Le 26/06/2017 à 01:45, Igor Fedorenko a écrit :
Can you explain little more why plugins won't see classes loaded by
maven core or maven core extensions classloaders? This is implemented in
classwords and I was under impression that java9 still allowed custom
classloading schemes like what we do or like what OSGi does.
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel
antivirus Avast.
https://www.avast.com/antivirus
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org