Deployed War Deployment with IntelliJ Idea, Maven, Tomcat and JRebel
I am developing a web application with IntelliJ Idea 12, Maven, JRebel and Tomcat. To take advantage of JRebel by automatically reloading changes to Spring beans, I used the deployed war deployment provided by Intellij below
Thanks to the Maven module, IntelliJ has exactly followed the Maven convention for compiling Java files in the output folder (target / classes) , which is DIFFERENT for the parsed webapp directoy (target / spring-mvc-showcase / webapp / WEB-INF / classes) . As a result, Tomcat and JRebel are unable to reload changes to these new classes.
At the moment I have temporarily configured the IntelliJ output folder to point to the WEB-INF / classes folder so that the changes can be reloaded. As I don't want to violate Maven conventions, can anyone tell me a more elegant solution?
target (Maven generated artifact directory)
|
-- classes (compiled)
|
-- spring-mvc-showcase (exploded webapp directory)
|
-- WEB-INF
|
-- classes
source to share
Once you've configured it correctly, when you start Tomcat, you should see something like this:
[2013-01-23 15:39:12] JRebel: Directory '/home/xxx/workspace/xxx/trunk/target/classes' will be monitored for changes.
[2013-01-23 15:39:12] JRebel: Directory '/home/xxx/workspace/xxx/trunk/src/main/webapp' will be monitored for changes.
Then I change something every time, instead of running the maven package, I do the "Make Project" update (in IDEA) // / and the setup will automatically reload its classes.
source to share
Here's an easy way to quickly start hot deployments using IDEA, Jrebel and maven-tomcat. Hot deploy IDEA web application using JRebel and tomcat7-maven-plugin
source to share