Moditect Vert.x Web Example
See original GitHub issueHi,
I’m currently trying to setup a Vert.x Web example which uses the maven plugin and add-module-info to generate the module descriptors so that I can build a runtime image.
For Vert.x core this works without any issue but once I add Vert.x Web I ran into a strange issue.
Somehow moditect is picking up a dependency which is not actually part of the dependency tree.
This might happen because Vert.x web has a pom dependency/managed dependency but I’m not sure. I tried to explicitly adding the groovy dependency to my project and also provide a module configuration for it but that did not work.
[ERROR] Failed to execute goal org.moditect:moditect-maven-plugin:1.0.0.Beta1:add-module-info (add-module-info-to-dependencies) on project vertx-graalvm-native-image-test-app:
Execution add-module-info-to-dependencies of goal org.moditect:moditect-maven-plugin:1.0.0.Beta1:add-module-info failed:
Unable to derive module descriptor for /home/jotschi/.m2/repository/org/codehaus/groovy/groovy-all/2.4.7/groovy-all-2.4.7.jar:
Provider class moduleName=groovy-all not in module -> [Help 1]
Any hint would be appreciated. We are also discussing the issue within this Vert.x Thread: https://groups.google.com/forum/#!topic/vertx/uIUAMaZLaec
A reproducer can be found in my vertx-graalvm-native-image-test repo within the dev-moditect branch.
https://github.com/Jotschi/vertx-graalvm-native-image-test/tree/dev-moditect
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
Hi, the example your provided (thank a lot by the way) works until a Vert.x version <= 3.8.0. From Vert.X version 3.8.1, Netty version uses some graalvm dependencies to be able to produce native images and it requires some updates.
NB: Change comes from Netty version 4.1.36.Final
Here is a “minimal” pom I tried:
I tried several things but I’m stuck with this issue:
Execution add-module-info-to-dependencies of goal org.moditect:moditect-maven-plugin:1.0.0.RC1:add-module-info failed: Module format not recognized: /home/jflorte/.m2/repository/com/oracle/substratevm/svm-hosted-native-linux-amd64/19.0.0/svm-hosted-native-linux-amd64-19.0.0.tar.gz
It seems it tries to enrich a transitive dependency from com.oracle.substratevm:svm:19.0.0 but I don’t know how to prevent the plugin from doing so.
If you have any idea, I’d be happy to investigate.
For the record, I also tried with newer versions of Vert.X. Jackson definition can be removed because they added module-info.java files. But the svm (and then asm) issue is still a blocker to me.
Cool, thanks for the heads-up!