Repository navigation
Add JPMS module path support for vertx:run - #791
Merged
tsegismont merged 1 commit intoOct 15, 2026
Merged
Conversation
When a Vert.x 5 project contains a `module-info.java`, the plugin auto-detects the modular setup and launches the application on the module path instead of the classpath. All project dependencies are placed on `--module-path` and the application is started with `--module`. Non-modular JARs become automatic modules transparently. Module path mode is not compatible with loading verticles by class name (the `vertx.verticle` property), because class-name-based loading crosses module boundaries and breaks JPMS encapsulation. When a modular project has a verticle configured, the plugin logs a warning and falls back to classpath mode. However, a custom launcher extending `VertxApplication` that supplies verticles programmatically (e.g. via `VertxApplicationHooks.verticleSupplier()`) works on the module path without issues. The `useModulePath` parameter controls this behavior: `auto` (default) enables module path when conditions are met, `false` forces classpath mode. Module name is read from the compiled `module-info.class` using ASM. `additionalDependencies` work in both classpath and module path modes. `additionalClasspathElements` are classpath-mode only and ignored on the module path. Assited-By: Claude Opus 4.6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a Vert.x 5 project contains a
module-info.java, the plugin auto-detects the modular setup and launches the application on the module path instead of the classpath. All project dependencies are placed on--module-pathand the application is started with--module. Non-modular JARs become automatic modules transparently.Module path mode is not compatible with loading verticles by class name (the
vertx.verticleproperty), because class-name-based loading crosses module boundaries and breaks JPMS encapsulation. When a modular project has a verticle configured, the plugin logs a warning and falls back to classpath mode. However, a custom launcher extendingVertxApplicationthat supplies verticles programmatically (e.g. viaVertxApplicationHooks.verticleSupplier()) works on the module path without issues.The
useModulePathparameter controls this behavior:auto(default) enables module path when conditions are met,falseforces classpath mode. Module name is read from the compiledmodule-info.classusing ASM.additionalDependencieswork in both classpath and module path modes.additionalClasspathElementsare classpath-mode only and ignored on the module path.Assited-By: Claude Opus 4.6