Java 9 service provider and Groovy Extension Modules

808 views Asked by At

In a java 9 project, I'd like to require vertx.web, which is the automatic name given for module io.vertx:vertx-web:3.4.2. Only, at runtime, I get the following error.

Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for /Users/user/.gradle/caches/modules-2/files-2.1/io.vertx/vertx-web/3.4.2/eee42405acff13d37eb2a62256189d419f91aa4d/vertx-web-3.4.2.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class moduleFactory = io.vertx.groovy.ext.web.VertxPropertiesModuleFactory not in module

It seems that vertx-web makes use of Groovy Extension Modules. This is why file META-INF/services/org.codehaus.groovy.runtime.ExtensionModule exists. Java9 reads this file wrongfully for Service Loading.

Is there any way to ignore this service file as it is in a dependency and I cannot change it ?

0

There are 0 answers