1

I am working with the Vert.x Gradle template hosted at the Vert.x Github space.

The build file suggests that there is a runModIDEA target that runs IDEA-built class files so that rebuild/redeploy is not required to pick up changes:

runModIDEA - run the module from the project resources in IDEA. This allows you to run the module without building it
first!

... yet the task does not exist per ./gradlew tasks.

I am not tied to this particular build task per se.

I just want a working auto-redeploy solution that enables me to see updates without a two minute rebuild/redeploy cycle.

EDIT: I also tried running it directly, pointing to InteliJ IDEA output classpath. It works fine, but doesn't pick up changes.

vertx runmod com.mycompany~vert-x-reverse-proxy~1.0.0-final -c conf.json -cp out/production/vert-x-reverse-proxy

EDIT: I also tried ./gradlew runmod -m, first changing vertx_classpath.txt so that the IDEA files (out/production) are looked at first. Still no redeploy. In fact, while it was running, I deleted the out directory and it continued working.

EDIT: I also tried vertx run com.mycompany.myproject.ReverseProxyVerticle -c conf.json -cp out/production/vert-x-reverse-proxy... same results. It ran as expected but did not pick up changes. Only way to pick up changes was to gradlew clean and re-assemble.

EDIT: I have been through these instructions as well.

Robert Christian
  • 18,218
  • 20
  • 74
  • 89

2 Answers2

3

For anyone who stumbles upon this question, I had the same problem and managed to fix it by deleting everything under the /mods folder in the /target directory. This is in fact mentioned in the vertx documentation - though maybe could be a little more emphatic. Once everything under /mods is removed, start up the application and it redeploys whenever anything is changed.

Cleo
  • 46
  • 1
  • By the way - in order to see changes in client-side web resources I also needed to set the preserve-cwd flag to true in the mod.json - which forces the application to serve from the source folder – Cleo Mar 10 '14 at 12:09
0

If you are new to vertx and stumble with this problem or similar, it might be worth to have a look at this vertx google group entry. It describes the changes that need to be done to the generated project by the Vertx Gradle Template to get it running. I know, this does not answer directly the question posted here but I hope it helps you further.

stitakis
  • 891
  • 1
  • 7
  • 7