Can JRebel redeploy changes in Maven dependencies?
Asked Answered
A

1

8

So I have a multi module Maven web app running in eclipse and tomcat with wtp.

However the deployment of the application takes some time: building sub modules if changed and starting the application takes also a couple of minutes. Thus I am thinking of using JRebel to speed up this whole process. But I do not know if JRebel can really help me. Most of the time I am working in the submodules. So the changes in the dependencies need to be deployed in my running web app.

I read on http://en.wikipedia.org/wiki/JRebel that updates in JARs are just ignored. Is this still true? I saw there are some kind of maven plugins for JRebel and Eclipse plugins. Can they manage this whole process or am I wasting my time?

Abducent answered 23/5, 2011 at 9:13 Comment(0)
C
11

The information at Wikipedia page is way too old

It depends what you would like to do. If you have submodules, I assume that these are JARs included to WEB-INF/lib of your application? In that case every individual modules should have a dedicated rebel.xml configuration file as follows:

myapp.war
   `- WEB-INF
       |- classes
       |     `- rebel.xml   <-- required to map the web app classes and resources 
       `- lib
           |- mylib1.jar
           |      `- rebel.xml  <-- maps mylib1.jar classes  
           |             
           |- mylib2.jar
           |      `- rebel.xml  <-- maps mylib2.jar classes 
           |- ...
           `- mylibN.jar

This should be the correct way in case you work with the souce code of your submodules. But if you want just to swap jars it is also possible if you map those in rebel.xml of your web app. Take a look at the reference manual for this:

http://manuals.zeroturnaround.com/jrebel/standalone/config.html

As you're using maven, it could be wise to generate rebel.xml files using JRebel maven plugin (just add the code snippet to your pom.xml):

http://manuals.zeroturnaround.com/jrebel/standalone/config.html#maven

Czarina answered 23/5, 2011 at 14:24 Comment(3)
What is with JRebel Remoting - do I need to put rebel-remote.xml in every library module too?Coley
If you want to map a module, then you have to add a dedicated rebel-remote.xml for each archive. But if you do not need to update a module, just leave it as it is.Czarina
FYI, all the links above are broken nowEsquivel

© 2022 - 2024 — McMap. All rights reserved.