2
votes

I have a maven multi module project why is it when I put this configuration:

<plugin>
 <groupId>org.zeroturnaround</groupId>
 <artifactId>jrebel-maven-plugin</artifactId>
 <version>1.1.3</version>
 <executions>
  <execution>
  <id>generate-rebel-xml</id>
  <phase>process-resources</phase>
  <goals>
   <goal>generate</goal>
  </goals>
  </execution>
 </executions>
</plugin>

in the root pom and mvn install the project no rebel.xml file is generated. I can generate it using mvn org.zeroturnaround:jrebel-maven-plugin:1.1.3:generate but that only creates the rebel.xml under target/classes and does not include it in the jar\war package.

But when I put the above configuration in the individual maven module it does generate it during install and includes it in the package as per process-resources

But I don't want to duplicate the plugin in all modules, but only put it in the root pom and during install is should generate the rebel.xml file and include in the package.

Am I missing how maven works?

1
Did you put that in the Plugins section or in the pluginManagement section? Does the parent pom has its packaging element set to pom? - Augusto
Thanks Augusto, I put it in the plugins section only, sounds like I need to put it in the pluginManagement section, will try that. And yes the root is pom package. - jakstack
It should be fine if it's in the plugins section :S. - Augusto
ya, adding to pluginManagement does not seem to help, will put back into plugins section - jakstack
Turns out it was my bad I had put the plugin by error in the pluginManagement section when I thought I had put it in the build>plugins section where it should be, now it's working fine. Many Thanks - jakstack

1 Answers

1
votes

Turns out it was my bad I had put the plugin by error in the pluginManagement section when I thought I had put it in the build>plugins section where it should be, now it's working fine. Many Thanks