Doesn't the maven-reactor-plugin allow which projects to select?

On Thu, Oct 1, 2009 at 2:51 AM, Entner Harald <[email protected]> wrote:
> Actually, you can. But it is not that straightforward as you may wish.
>
> Fact 1: A profile is inherited only, when it's defined in the child pom.
>
> So you could move your plugin definition into a profile.
> -Give it an (profile) id
> -Inherit the profile in your child pom (and give it a phase)
>
> That way, it should work. I did the same with the glassfish:plugin.
>
> You can have a look here for a more detailed explanation:
>
> http://mail-archives.apache.org/mod_mbox/maven-users/200812.mbox/%[email protected]%3e
>
> There will be still some duplication, so if there is a better way i would be 
> happy to hear about it, but afaik there is not other way to deal with this 
> problem. (When there is no default phase, you can also leave the phase 
> besides, so the plugin should not execute too, still you will have to define 
> the plugin in the childs, but without configuration)
>
> Hope this helps
>
> Harald.
>
> -----Ursprüngliche Nachricht-----
> Von: Brian Fox [mailto:[email protected]]
> Gesendet: Donnerstag, 1. Oktober 2009 07:31
> An: Maven Users List
> Betreff: Re: Reactor - skip parent project build
>
> You can't. The parent will always run first in a reactor before
> anything that inherits from it.
>
> On Wed, Sep 30, 2009 at 6:03 PM, droidin.net <[email protected]> wrote:
>>
>> I have a parent POM which defines 5 modules (5 subprojects). Since each
>> module is executed in exactly the same way I pull <profile><build> section
>> into the parent POM to get rid of the duplicate code. Now - if I execute
>> build individually from each module it works, however if I want to build all
>> modules at once and move to the parent directory I got error since the very
>> first thing Maven tries to execute is the parent project itself:
>>
>>>mvn package -P release
>> [INFO] Scanning for projects...
>> [INFO] Reactor build order:
>> [INFO]   DWD Parent project
>> [INFO]   Projects
>>
>> After that build fails because exec plugin tries to execute something that
>> is not there. Looking at the output it is pretty obvious that reactor plugin
>> is driving the build but how can I configure reactor to skip the parent?
>> --
>> View this message in context: 
>> http://www.nabble.com/Reactor---skip-parent-project-build-tp25691730p25691730.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to