Question

We are having some issues setting up Vert.x with IntelliJ to automatically reload classes during development. We have used the "best practice" approach as described in their docs (using maven), but cannot get the auto-redeploy to work.

Steps to reproduce:

  1. Create your project using mvn archetype:generate -Dfilter=io.vertx:
  2. Execute mvn idea:idea to create the IntelliJ project
  3. Open the .ipr file in IntelliJ
  4. Make sure to set project settings to Preferences -> Compiler -> Make Project Automatically
  5. Make sure "auto-redeploy": true is set in mod.json in the resources folder
  6. Build project for the first time: CMD + Fn + F9 (CMD + F9 if you use media keys as function keys)
  7. Run vertx:runMod from the Maven panel (or from the command line)

At this point the application starts up (and when inspecting the target/mods folder it does seem to create the module). However, making a change to the PingVerticle class and saving results in absolutely nothing happening. Also, none of the resources are copied over, so when starting a simple web server, it always results in "resources not found". The vertx_classpath.txt has all the directories with the resources though.

What I have also found is that when adding external dependencies to your pom, these are not copied to the module and will result in a class not found exception.

Are we missing something in the setup process? Thanks.

Was it helpful?

Solution

Seems that it was the amalgamation of series of unfortunate events. Yonders ago we had to use a specific version of Maven (3.0.5) with a specific version of Java (1.7u45). I cannot exactly remember why, probably something to do with the production system we were working on. However, after updating everything (Maven 3.2.1 and Java 1.8.0) and removing the old paths, everything works as intended.


UPDATE

Actually, it turns out that the issue was that there was a space in the path to the project. Removing it solved everything.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top