You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Kristian Rosenvold <kr...@gmail.com> on 2012/11/20 21:37:41 UTC

MJAVADOC-171, fix for too many forked lifecycles in site...

I think I found at least one cause of too many forked lifecycles within site.

Basically the aggregators are being run for every module in the
reactor, if I understand things correctly they should only be run for
"pom"
modules.

I have a very simple patch at
https://github.com/krosenvold/maven-shared/commit/9536ef08946d4e0aa6d3d0533642bb5640da4a11
I was hoping someone who actually understands this stuff would comment
on this patch ;)

I will make some tests if the patch looks good ;)

Kristian

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


Re: MJAVADOC-171, fix for too many forked lifecycles in site...

Posted by Brett Porter <br...@apache.org>.
On 21/11/2012, at 11:50 AM, Benson Margulies <bi...@gmail.com> wrote:

> On Tue, Nov 20, 2012 at 7:45 PM, Brett Porter <br...@apache.org> wrote:
>> 
>> On 21/11/2012, at 7:37 AM, Kristian Rosenvold <kr...@gmail.com> wrote:
>> 
>>> I think I found at least one cause of too many forked lifecycles within site.
>>> 
>>> Basically the aggregators are being run for every module in the
>>> reactor, if I understand things correctly they should only be run for
>>> "pom"
>>> modules.
>>> 
>>> I have a very simple patch at
>>> https://github.com/krosenvold/maven-shared/commit/9536ef08946d4e0aa6d3d0533642bb5640da4a11
>>> I was hoping someone who actually understands this stuff would comment
>>> on this patch ;)
>>> 
>>> I will make some tests if the patch looks good ;)
>> 
>> I'm not sure this covers every use case. For example, what about a project that has submodules that are POMs for hierarchy? While uncommon, I think it is also possible to build an artifact at the root that isn't a POM. IIRC there has been a method introduced to determine if the current project is the execution root - perhaps that's what's needed here.
> 
> I'm not sure I follow. This will go ahead and for any pom with
> packaging 'pom'. Is your concern that it will still run too many, as
> it will aggregate at each intermediate level? My inclination is to
> think that aggregation should only happen at the root, not at
> intermediates, but I could see room for disagreement.

Right, I think that's what I was saying. For example, wouldn't this aggregate again here?
http://svn.apache.org/repos/asf/archiva/trunk/archiva-modules/archiva-web/pom.xml

- Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter
http://twitter.com/brettporter






Re: MJAVADOC-171, fix for too many forked lifecycles in site...

Posted by Hervé BOUTEMY <he...@free.fr>.
Le mardi 20 novembre 2012 19:50:22 Benson Margulies a écrit :
> On Tue, Nov 20, 2012 at 7:45 PM, Brett Porter <br...@apache.org> wrote:
> > On 21/11/2012, at 7:37 AM, Kristian Rosenvold 
<kr...@gmail.com> wrote:
> >> I think I found at least one cause of too many forked lifecycles within
> >> site.
> >> 
> >> Basically the aggregators are being run for every module in the
> >> reactor, if I understand things correctly they should only be run for
> >> "pom"
> >> modules.
> >> 
> >> I have a very simple patch at
> >> https://github.com/krosenvold/maven-shared/commit/9536ef08946d4e0aa6d3d05
> >> 33642bb5640da4a11 I was hoping someone who actually understands this
> >> stuff would comment on this patch ;)
> >> 
> >> I will make some tests if the patch looks good ;)
> > 
> > I'm not sure this covers every use case. For example, what about a project
> > that has submodules that are POMs for hierarchy? While uncommon, I think
> > it is also possible to build an artifact at the root that isn't a POM.
> > IIRC there has been a method introduced to determine if the current
> > project is the execution root - perhaps that's what's needed here.
> I'm not sure I follow. This will go ahead and for any pom with
> packaging 'pom'.
> Is your concern that it will still run too many, as
> it will aggregate at each intermediate level?
for the moment, it is run at each level, even when not pom packaging, ie AFAIK 
the only case where there can be modules, then aggregator means something (or 
I may miss something)

> My inclination is to
> think that aggregation should only happen at the root, not at
> intermediates, but I could see room for disagreement.
root is a relative notion: if you build starting from this intermediate, this 
is the root from the build. IMHO it would be better if partial builds gave the 
same result when built as part of a super-build
to avoid that an aggregator report is run in modules, the user must do the 
effort of configuring <inherit>false</inherit>: yes, this requires user work, 
but at least there is no magic

maybe the right algorithm to choose if an aggregator goal needs to be run is: 
packaging==pom and has modules

Regards,

Hervé

> 
> > Cheers,
> > Brett
> > 
> > --
> > Brett Porter
> > brett@apache.org
> > http://brettporter.wordpress.com/
> > http://au.linkedin.com/in/brettporter
> > http://twitter.com/brettporter
> > 
> > 
> > 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org

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


Re: MJAVADOC-171, fix for too many forked lifecycles in site...

Posted by Benson Margulies <bi...@gmail.com>.
On Tue, Nov 20, 2012 at 7:45 PM, Brett Porter <br...@apache.org> wrote:
>
> On 21/11/2012, at 7:37 AM, Kristian Rosenvold <kr...@gmail.com> wrote:
>
>> I think I found at least one cause of too many forked lifecycles within site.
>>
>> Basically the aggregators are being run for every module in the
>> reactor, if I understand things correctly they should only be run for
>> "pom"
>> modules.
>>
>> I have a very simple patch at
>> https://github.com/krosenvold/maven-shared/commit/9536ef08946d4e0aa6d3d0533642bb5640da4a11
>> I was hoping someone who actually understands this stuff would comment
>> on this patch ;)
>>
>> I will make some tests if the patch looks good ;)
>
> I'm not sure this covers every use case. For example, what about a project that has submodules that are POMs for hierarchy? While uncommon, I think it is also possible to build an artifact at the root that isn't a POM. IIRC there has been a method introduced to determine if the current project is the execution root - perhaps that's what's needed here.

I'm not sure I follow. This will go ahead and for any pom with
packaging 'pom'. Is your concern that it will still run too many, as
it will aggregate at each intermediate level? My inclination is to
think that aggregation should only happen at the root, not at
intermediates, but I could see room for disagreement.


>
> Cheers,
> Brett
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
> http://twitter.com/brettporter
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

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


Re: MJAVADOC-171, fix for too many forked lifecycles in site...

Posted by Brett Porter <br...@apache.org>.
On 21/11/2012, at 7:37 AM, Kristian Rosenvold <kr...@gmail.com> wrote:

> I think I found at least one cause of too many forked lifecycles within site.
> 
> Basically the aggregators are being run for every module in the
> reactor, if I understand things correctly they should only be run for
> "pom"
> modules.
> 
> I have a very simple patch at
> https://github.com/krosenvold/maven-shared/commit/9536ef08946d4e0aa6d3d0533642bb5640da4a11
> I was hoping someone who actually understands this stuff would comment
> on this patch ;)
> 
> I will make some tests if the patch looks good ;)

I'm not sure this covers every use case. For example, what about a project that has submodules that are POMs for hierarchy? While uncommon, I think it is also possible to build an artifact at the root that isn't a POM. IIRC there has been a method introduced to determine if the current project is the execution root - perhaps that's what's needed here.

Cheers,
Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter
http://twitter.com/brettporter






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