Closed geakstr closed 3 years ago
@geakstr I've found the same thing. http://vertx.io/dev_guide.html gives the following command for running a module through maven but it doesn't work as vertx:runMod doesn't trigger a compile.
mvn clean vertx:runMod
Here's the output when running that command:
$ mvn clean vertx:runMod
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Project - example-mod 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ example-mod ---
[INFO] Deleting /Users/user/code/example-mod/target
[INFO]
[INFO] --- vertx-maven-plugin:2.0.11-final:runMod (default-cli) @ example-mod ---
[ERROR]
java.lang.ClassNotFoundException: com.example.PingVerticle
at org.vertx.java.platform.impl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:127)
at org.vertx.java.platform.impl.ModuleClassLoader.loadClass(ModuleClassLoader.java:108)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.vertx.java.platform.impl.java.JavaVerticleFactory.createVerticle(JavaVerticleFactory.java:55)
at org.vertx.java.platform.impl.DefaultPlatformManager$21.run(DefaultPlatformManager.java:1748)
at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:175)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:370)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at java.lang.Thread.run(Thread.java:745)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.355 s
[INFO] Finished at: 2015-03-07T09:13:49+00:00
[INFO] Final Memory: 12M/303M
[INFO] ------------------------------------------------------------------------
If I run the following command then everything works ok:
mvn compile vertx:runMod
It would be great if http://vertx.io/dev_guide.html could be updated to say something like mvn compile vertx:runMod
or the plugin changed so the runMod depends on a compile.
How can i do this? I have this in pom.xml
I try change "scope" to compile and runtime too. But when I do "mvn vertx:runMod" I get java.lang.NoClassDefFoundError: org/rythmengine/Rythm
When I do "mvn clean package vertx:runMod" this is work (I have modified mod.xml in assembly dir), but live reload not.
Vertx 2.1