Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.6.0
-
None
-
Apache Maven 3.4.0-SNAPSHOT (227085283b6379038ec16f4cf9ad2e8869cef694; 2016-07-06T21:29:12+02:00)
Description
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>):
<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>
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.
Implemented Solution
<project child.project.url.inherit.append.path="false"> <url>...</url> <scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false" child.scm.url.inherit.append.path="false"> <connection>...</connection> <developerConnection>...</developerConnection> <url>...</url> </scm> <distributionManagement> <site child.site.url.inherit.append.path="false"> <url>...</url> </site> </distributionManagement> </project>
Attachments
Issue Links
- fixes
-
MNG-6384 Project URL should not be extended with artifactId when inherited
- Closed
- is related to
-
MNG-6505 child.(x.y).inherit.append.path value should be inherited
- Closed
-
MRELEASE-1053 scm element removed during release:prepare when parent != reactor root
- Closed
- relates to
-
MNG-5878 add support for module name != artifactId in every calculated URLs (project, SCM, site): special project.directory property
- Closed
- supercedes
-
MNG-5951 add an option to avoid path addition to inherited URLs
- Closed
-
MNG-6159 Child path adjustments break git scm urls
- Closed
- links to
- mentioned in
-
Page Loading...