maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hervé Boutemy (JIRA) <j...@apache.org>
Subject [jira] [Commented] (MNG-6059) Important use cases not covered, as child.inherit.append.path affects all children
Date Sun, 10 Jul 2016 08:22:11 GMT

    [ https://issues.apache.org/jira/browse/MNG-6059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15369492#comment-15369492
] 

Hervé Boutemy commented on MNG-6059:
------------------------------------

Andreas, I updated the doc
Now, let's see what to change.
First, the XML attribute names: look at the unit test pom.xml using these 3 attributes https://git1-us-west.apache.org/repos/asf?p=maven.git;a=blob;f=maven-model-builder/src/test/resources/poms/inheritance/no-append-urls-parent.xml;h=e8bc1652a4032df82cc40cbdb14e982c15625d8b;hb=HEAD

If we split the 3 attributes with their impact on pom elements
{code:xml}<project child.inherit.append.path="false">
...
<url>http://www.apache.org/path/to/parent/</url>
...
</project>{code}
{code:xml}  <scm child.inherit.append.path="false">
    <connection>scm:my-scm:http://domain.org/base</connection>
    <developerConnection>scm:my-scm:https://domain.org/base/</developerConnection>
    <url>https://domain.org/base</url>
  </scm>{code}
{code:xml}  <distributionManagement>
    <site child.inherit.append.path="false">
      <url>scp://scp.domain.org/base/</url>
    </site>
  </distributionManagement>{code}

given the attribute is not on the url element, their uniform {{child.inherit.append.path}}
should be changed?
Do you have a proposal for better naming?

and, of course, if you want a separate configuration for scm.url and scm.connection/developerConnection,
you'll have to propose 2 attribute names on scm

> Important use cases not covered, as child.inherit.append.path affects all children
> ----------------------------------------------------------------------------------
>
>                 Key: MNG-6059
>                 URL: https://issues.apache.org/jira/browse/MNG-6059
>             Project: Maven
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>         Environment: Apache Maven 3.4.0-SNAPSHOT (227085283b6379038ec16f4cf9ad2e8869cef694;
2016-07-06T21:29:12+02:00)
>            Reporter: Andreas Sewe
>
> 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
<http://central.sonatype.org/pages/requirements.html>):
> {noformat}
> <scm>
>   <connection>scm:git:git://github.com/simpligility/ossrh-demo.git</connection>
>   <developerConnection>scm:git:ssh://github.com:simpligility/ossrh-demo.git</developerConnection>
>   <url>http://github.com/simpligility/ossrh-demo/tree/master</url>
> </scm>
> {noformat}
> If the {{ossrh-demo.git}} repository contains a child module called {{some-module}},
then that child’s {{scm/url}} should become {{http://github.com/simpligility/ossrh-demo/tree/master/some-module}}
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
(v6.3.4#6332)

Mime
View raw message