Every change of code requires "mvn clean install"

1,483 views
Skip to first unread message

Oren Shvalb

unread,
May 24, 2014, 2:46:21 PM5/24/14
to ve...@googlegroups.com
Hi,

I have several modules that are deployed using a "deployer module".

Every module has vertx_classpath.txt and "auto_redeploy" flag is turned on.
I've defined VERTX_MODS variable and created a module link for all of them.

I work with Eclipse, and my problem is that for every little change in code I need to perform "mvn clean install".

I do see that auto-redeploy works - I can see that all modules are being reloaded, *BUT* it works on the old code from my local maven repository instead of working on my new code from the eclipse workspace projects.

Anyone has an idea why this happen??

Thank you!

Nick Scavelli

unread,
May 27, 2014, 11:55:41 AM5/27/14
to ve...@googlegroups.com
Since others have had trouble with this I created a simple 3 module maven project which hopefully helps people setting up said project. https://github.com/nscavell/multi-example. Follow the README to get autodeploy working. 

It's important to remember that if you run mvn install, then the maven vertx plugin will run the module that's built under the target directory and not the module link file which just links back to vertx_classpath.txt file.

Tim Fox

unread,
May 27, 2014, 12:06:49 PM5/27/14
to ve...@googlegroups.com
On 27/05/14 16:55, Nick Scavelli wrote:
Since others have had trouble with this I created a simple 3 module maven project which hopefully helps people setting up said project. https://github.com/nscavell/multi-example. Follow the README to get autodeploy working. 

It's important to remember that if you run mvn install, then the maven vertx plugin will run the module that's built under the target directory and not the module link file which just links back to vertx_classpath.txt file.

Yes, this is why it's important to mvn clean after mvn install if you want use auto redeploy from the IDE (I think this is mentioned in the docs)


On Saturday, May 24, 2014 2:46:21 PM UTC-4, Oren Shvalb wrote:
Hi,

I have several modules that are deployed using a "deployer module".

Every module has vertx_classpath.txt and "auto_redeploy" flag is turned on.
I've defined VERTX_MODS variable and created a module link for all of them.

I work with Eclipse, and my problem is that for every little change in code I need to perform "mvn clean install".

I do see that auto-redeploy works - I can see that all modules are being reloaded, *BUT* it works on the old code from my local maven repository instead of working on my new code from the eclipse workspace projects.

Anyone has an idea why this happen??

Thank you!
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Trevor S

unread,
May 27, 2014, 7:41:58 PM5/27/14
to ve...@googlegroups.com
auto_redeploy and mvn install/package are incompatible.

i use intellij, hut this should be the same.

  1. run mvn clean.  
  2. run mvn vertx:init
  3. edit vertx_classpath.txt to replace target/dependencies with /target/dependency.  (very important step)  woudl not be needed if vertx.init included target/dependency (see next step)
  4. run mvn dependency:copy-dependencies   .. you will now see target/depenendy full of your dependencies.
  5. compile in the IDE (or mvn:compile)
  6. run vertx:runMod
  7. if you do an mvn install, or package, repeat the above to get back auto-redeploy.
BTW - note the difference in target/mods when you do the above and when you do an install.  when you do an install, you are essentially static.

i though autoreploy was broken until i figured this out.  woudl love for this to be in the docs...


On Saturday, May 24, 2014 2:46:21 PM UTC-4, Oren Shvalb wrote:
Reply all
Reply to author
Forward
0 new messages