Cannot compile save / hot deploy function to work with maven web server in eclipse or netbeans

So, our new webapp project is based on maven. I really like dependency management and an agnostic IDE, but I have problems compiling and debugging.

Here's how I could get a clean copy of a project working

  • Check out the main project from SVN
  • Open project in IDE (I tried in eclipse 3.4 and netbeans 6.7)
  • The IDE will automatically open two subprojects, one of which is webapp, and the other is a supporting utils bank.
  • From the command line, run mvn war: inplace in the webapp module, which creates a working copy of webapp with all the dependencies in WEB-INF / lib /

This works fine, but whenever I change the java class I have to clear and create / reload the application context.

I googled high and low, but no one seems to be complaining about it, so I think there must be something really obvious that I went missing. How does everyone else handle incremental compilation and hot deployment using maven?

To clarify everything I'm looking for is to repeat the behavior that I used before maven, where I could make simple changes to java classes and they would be instantly compiled and hotly deployed to running webapp. I don't need anything like jRebel etc. I just want the new tool to give me the same functionality that I liked my old tools with.

+4
source share
3 answers

Netbeans should support it out of the box. Although, there is still an error related to this: http://netbeans.org/bugzilla/show_bug.cgi?id=177230

0
source

If you can use mvn jetty:run , it will read classes and resources directly from the project. Using the Maven2 Eclipse plugin and starting the server built into Eclipse has automatic publishing, which allows you to get to the end, albeit at a slower rate. And JRebel, starting with 2.0 (as you know), can display the Maven module directly in the deployed application, so you get instant build and redeploy. These are the only solutions that I know of.

+1
source

In-place work for me with Netbeans 7.0.1 and Tomcat 6.0.x, if I use Tomcat 7.0.x in-place deployment, it doesn't work. Tomcat always copies the application to $ CATALINA_HOME / temp :(

0
source

All Articles