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

Robert Scholte commented on MNG-6059:
-------------------------------------

Even though I'd prefer to have SCM on every release-root, I don't think it is 
necessary. For the aggregator the scm is not interesting, it should never be 
released. The parent can have the scm, all modules referring to it (including 
relative path) can calculate the connection with the logic per provider.
But still: why in the effective pom? Maven doesn't care about SCM, either 
plugins or extensions do. So they should be able to calculate the actual 
connection (with help from maven-project-utils).

[connection|http://maven.apache.org/scm/scm-url-format.html] is more than a 
String: it has a protocol and the provider of that protocol decided how the 
connections must look like. Otherwise there would be no reason to have separate 
implementations. This is probably done to prevent conversion to the actual 
connectionUrl; now you can often use it as-is when connecting to the repository.
If I could redesign the scm-part of the pom I would probably split it up in 
more elements which would be interesting for all SCM implementations. And yes, 
then you have repository root and a repository path. It would be up to the 
provider to handle it.



> 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)

Reply via email to