Skip to content

Packaging mod-rxvertx into my project's module #36

@wklenk

Description

@wklenk

Vert.x documentation states:
*Nested modules - Packaging all module dependencies in the module

The usual behaviour of Vert.x is to download and install module dependencies the first time they are referenced at runtime, if they're not already installed. For some production deployments this is not necessarily desirable - there may be a requirement that modules deployed on a production server must contain everything necessary to run then without calling out to download more artifacts at runtime.

For these situations Vert.x supports packaging a module, along with all the other modules that it references inside the same module to give a single self contained deployment unit.*

I did exactly this and have the following folder structure inside my project's module:
myproject-mod.zip
+- com
+- mods
--+- io.vertx~mod-rxvertx-1.0.0-beta2
------+- io
------+- lib
------+- mods

In my project's mod.json, I have the following lines:

"includes": "io.vertxmod-rxvertx1.0.0-beta2",
"deploys": "io.vertxmod-rxvertx1.0.0-beta2"

On the production system, I rename this myproject-mod.zip to a filename following the vert.x module name rules like "com.testtest1.0.0"

But when I try to run the module with "vertx runmod com.testtest1.0.0 -cp com.testtest1.0.0" then I can see that vert.x downloads this io.vertxmod-rxvertx1.0.0-beta2 instead to use the "embedded" module.

If I DON'T specify the "includes" statement in mod.json, the mod-rxvertx is taken directly from the zip-file, but then I get ClassLoading exceptions, as the RxJava classes are not on the classpath.

Can you tell me HOW to use this "includes" statement, but also do not try to download the mod-rxvertx from a repository, but to use the embedded one?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions