maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Sewe (JIRA)" <>
Subject [jira] [Commented] (MNG-6059) Important use cases not covered, as child.inherit.append.path affects all children
Date Thu, 04 Aug 2016 07:14:20 GMT


Andreas Sewe commented on MNG-6059:

I think you're confused between {{project.url}} and {{project.scm.url}}

I assume you meant "Users may be confused what {{project/@child.inherit.append.path="url"}}
refers to". If so, I disagree: As the {{child.inherit.append.path}} is attached to the {{project}}
element, it of course affects the {{url}} *child* of {{project}}, not of {{project/scm}}.
On the other hand, {{project/scm/@child.inherit.append.path="url"}} would affect {{project/scm}}.

perhaps the same child.inherit.append.path attribute name for the 3 places is an issue: should
we rename them to child.project.url.inherit.append.path, child.scm.inherit.append.path and

I would use the *same* attribute name in all cases *if* the attribute's _logical_ value set
is the same. And by "same" I mean "space-delimited list of child element names". If we follow
your suggestion, then each attribute would have a different value set (as a value of {{connections}}
wouldn't make sense for {{child.project.url.inherit.append.path}}. But personally, I like
a single attribute with a single logical value set and uniform semantics better.

Also, I can at least *imagine* cases where {{project/scm/connection}} and {{project/scm/developerConnection}}
follow different rules as they use different protocols ({{scm:http}} for {{connection}} vs.
{{scm:example}} for {{developerConnection}}, the latter not using hierarchical URIs).

> Important use cases not covered, as child.inherit.append.path affects all children
> ----------------------------------------------------------------------------------
>                 Key: MNG-6059
>                 URL:
>             Project: Maven
>          Issue Type: Improvement
>          Components: Inheritance and Interpolation
>         Environment: Apache Maven 3.4.0-SNAPSHOT (227085283b6379038ec16f4cf9ad2e8869cef694;
>            Reporter: Andreas Sewe
>            Assignee: Hervé Boutemy
>             Fix For: 3.4.0
> The {{child.inherit.append.path}} attribute introduced with MNG-5951 unfortunately does
not support the use case where the children of the element with the attribute should follow
different inheritance rules. Take a typical configuration for Github, for example (taken from
> {noformat}
> <scm>
>   <connection>scm:git:git://</connection>
>   <developerConnection>scm:git:ssh://</developerConnection>
>   <url></url>
> </scm>
> {noformat}
> If the {{ossrh-demo.git}} repository contains a child module called {{some-module}},
then that child’s {{scm/url}} should become {{}}
as per the normal inheritance rules, but both the {{scm/connection}} and {{scm/developerConnection}}
URLs should remain unchanged.
> Unfortunately, this is not possible with {{*child*.inherit.append.path}}, which acts
on all children simultaneously.
> IMHO, this is a conceptual problem. In particular, setting {{child.inherit.append.path}}
on the *root* element to just control a single child ({{project/url}}) feels wrong, as the
attribute is in all likelihood not even located close to the {{<url>}} element it controls.

This message was sent by Atlassian JIRA

View raw message