Le mardi 6 novembre 2018, 10:35:25 CET Mark Raynsford a écrit :
> 'Ello.
> 
> On 2018-11-06T00:03:53 +0100
> 
> Hervé BOUTEMY <herve.bout...@free.fr> wrote:
> > Hi Mark,
> > 
> > even if this is somewhat a corner case (while overriding everything in b,
> > you can override the attribute also), it is strange...
> 
> I'm not sure it's a corner case, exactly. It reflects the real-life
> situation I'm in: Consider a tree where 'a' is the root, and there are
> a large number of projects (at the depth of 'b') that all inherit from
> 'a'. In my case "large" means "more than seventy" so, as you can
> imagine, I'm not enthusiastic about going through all of those projects
> and adding an attribute just to to fix a bug in Maven. :) In my case,
> there are over 400 modules at the depth of 'c' spread across all of the
> 'b'-level projects.
it's a corner case just because in b, you define 
distributionManagement.site.id, name and url, but not 
@child.site.url.inherit.append.path: just define this attribute while at it 
(instead of counting on inheritance) and it will work as expected. Like 
proposed in https://github.com/io7m/mng-6059-examples/pull/1
> 
> > I can reproduce the issue in an inheritance unit test (no-append-urls in
> > maven-model-builder), but still need to investigate why it does not work
> > as
> > intended by ModelMerger.mergeSite(...): you can easily check by removing
> > "name" field in b, you'll see that merge for other fields does not work
> 
> Good to know it's reproducible in tests.
in fact, you can also reproduce by defining in b:
  <distributionManagement>
    <site>
      <name>name from B</name>
    </site>
  </distributionManagement>

If you look at effective pom, you'll see that id and url are unexpectedly not 
inherited...

You discovered an edge case with the new attribute that already exists with 
elements: I still didn't have time yet to investigate on the cause, but will do

Regards,

Hervé




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

Reply via email to