You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ramo <om...@gmail.com> on 2012/08/08 11:13:50 UTC

Maven Multi Module Project + root pom plugin


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



 org.zeroturnaround
 jrebel-maven-plugin
 1.1.3
 
  
  generate-rebel-xml
  process-resources
  
   generate
  
  
 




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?




--
View this message in context: http://maven.40175.n5.nabble.com/Maven-Multi-Module-Project-root-pom-plugin-tp5716458.html
Sent from the Maven - Users mailing list archive at Nabble.com.

Re: Maven Multi Module Project + root pom plugin

Posted by Ramo <om...@gmail.com>.
Many Thanks Anders,

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

In any case now it's working. 

Many thanks for your time replying to my query.

Regards



--
View this message in context: http://maven.40175.n5.nabble.com/Maven-Multi-Module-Project-root-pom-plugin-tp5716458p5716461.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven Multi Module Project + root pom plugin

Posted by Anders Hammar <an...@hammar.net>.
> I have a maven multi module project why is it when I put this configuration:
>
>  org.zeroturnaround
>  jrebel-maven-plugin
>  1.1.3
>
>
>   generate-rebel-xml
>   process-resources
>
>    generate

Nabble removes some markup. Stop using Nabble or post the xml
somewhere where it will be readable. But I guess you're using the
configuration suggested by Zero Turnaround [1].

> in the root pom and mvn install the project no rebel.xml file is generated.

Is the plugin executed. You would see this in the console output. I
see no reason why it wouldn't be executed. No rebel.xml could be due
to something else.

> 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.

You're confusing me. The "root pom" in a multi-module project
shouldn't produce a jar or a war.

> 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

This I don't understand. The plugin execution should be inherited. Is
you module inheriting from the parent pom where the plugin execution
is declared?
You could also check the effective-pom ("mvn help:effective-pom").
This is what Maven will be working on. Check that the plugin it is
declared there.

> 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.

Although I find Zeroturnaround's documentation lacking lots of info
around this, it should work from a Maven perspective. But I don't know
if they do something special going on in the plugin.

Btw, I find it strange that Zeroturnaround's documentation suggest
that you execute "mvn jrebel:generate" (I would do "mvn install"). But
I don't know the workflow for using Jrebel so there might be some
reason to this.

/Anders

[1] http://zeroturnaround.com/software/jrebel/maven/

>
> Am I missing how maven works?
>
>
>
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Maven-Multi-Module-Project-root-pom-plugin-tp5716458.html
> Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org