maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "droidin.net" <dr...@droidin.net>
Subject Re: Reactor - skip parent project build
Date Thu, 01 Oct 2009 20:46:17 GMT

Well. 1. I don't want to pollute my command line. 2. I may have variable
number of projects which I much rather handle by adding/removin modules from
list

Bo


Paul Benedict-2 wrote:
> 
> Doesn't the maven-reactor-plugin allow which projects to select?
> 
> On Thu, Oct 1, 2009 at 2:51 AM, Entner Harald <Entner.Harald@afb.de>
> 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/%3Cb04c95f40812011251o5524add9h9ba3f27308edd465@mail.gmail.com%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:brianf@infinity.nu]
>> 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 <droid@droidin.net> 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: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Reactor---skip-parent-project-build-tp25691730p25706195.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


Mime
View raw message