Question

How I can configure JRebel for multi-module maven project? For now, I added JRebel plugin to my parent pom.xml and I generated several rebel.xml files (one rebel.xml per child module) using jrebel:generate command. Is it correct behavior to generate several rebel.xml files for each module?

EDIT: In final all my modules will be collected at single EAR. So it mean I need to remove JRebel-maven-plugin from parent pom.xml and declare it only for pom.xml of EAR module of my project?

Was it helpful?

Solution

Every 'artifact' that gets generated needs to have it's own rebel.xml file associated with it. If you look at the contents of rebel.xml it simply points to where JRebel can find the source directories, and these are generated to absolute paths by the maven plugin for ease of use.

I would be sure to put the JRebel plugin in a separate profile that is only active on development machines so you don't get these files generated for production.

For the ear, you don't need to remove the plugin. I don't think it will hurt anything, you just wont get much benefit from it. JRebel will find the rebel.xml files for all the separate jars/wars and use those as needed.

So in short, you are adding them in the correct spots.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top