I'm trying to create a simple "Hello World" vertx java application on OpenShift, but somehow my class can not be found/run.
I have created a new app on OpenShift and cloned the git repository, from there I have added my sample Test.java class.
Also I have added to the /configuration/vertx.env file
export vertx_module=com.test~project~1.0
in my pom.xml I have
<artifactId>project</artifactId>
<groupId>com.test</groupId>
<version>1.0</version>
I also tried and added the following to the /mods/mod.json file
{
"main": "com.test.project.Test"
}
.... What am I missing, or otherwise said, how should be the project structured (on OpenShift) in order to make vertx run my simple Test.class ?
Or is there maybe an additional maven step that must be taken inside the pom.xml?
Ok ... it seems that currently the vertx catridge doesn't run a maven build after git push. This is somehow broken (at least for Java).
To get your Java module running you need to log into your app via OpenShift console and then:
run the maven build for your vertx java module (this will put the correct files into the maven .m2 folder and vertx will find it). Files are stored in: ~/app-root/repo
restart vertx:
sh ~/vertx/bin/control restart
Hopefully will OpenShift automate this steps in the future.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With