maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Connolly (JIRA)" <>
Subject [jira] [Commented] (MPIR-234) SCM-link in site of multimodule projects should not append module name by default (at least for git)
Date Tue, 11 Aug 2015 10:06:46 GMT


Stephen Connolly commented on MPIR-234:

> Argh! hit Add too soon

I wonder should we be reporting an inferred SCM location at all when the SCM is inherited
*and* equal to the parent's (to catch the case where somebody uses EL to define the SCM locations
of the child projects, e.g.)


Though, even there I feel that the SCM section should only be present for *release roots*.
In fact in some custom tooling we have at my day job we use the presence of the SCM section
in the {{pom.xml}} as an indicator that this is a release root.

I would much rather have the report of a project that is inheriting it's SCM section say "Go
to XYZ and check it out to get the source" rather than try and infer a sub-path.

This is good for a number of reasons, not least being that when looking at the *master* branch
docs, if you do not check out the release root you will have unresolved -SNAPSHOT dependencies.

Now there are obviously some complications, such as where inheritance does not follow aggregation.
In those cases I think it would be reasonable for people to configure the report with the
pointer to the aggregating release root project (by {{G:A}} and then resolved from the reactor
falling back to the repos) so that you can display the correct SCM details.

If we go with this approach, we gain that the {{<scm>}} element should only be present
for release roots and we can kill off the crazy inference logic completely... so basically
the report's configuration would have perhaps three values:


If the {{scmParentGroupId}} or {{scmParentArtifactId}} are unset then you walk up the {{parent}}
tree until you find a {{parent}} with a {{<scm>}} section... you can then walk back
down trying to find the relative path using {{<module>}} references if you cannot find
it then I would just give up... and assume that an unspecified {{scmParentRelativePath}} is

Then the page would basically say, 

> To get the source code checkout: <insert scm details from parent> and cd <insert

That should work for everything. Where the report is incorrect the users can either add the
configuration to the report or add an explicit {{<scm>}} section.

> SCM-link in site of multimodule projects should not append module name by default (at
least for git)
> ----------------------------------------------------------------------------------------------------
>                 Key: MPIR-234
>                 URL:
>             Project: Maven Project Info Reports Plugin
>          Issue Type: Bug
>          Components: scm
>    Affects Versions: 2.4
>            Reporter: Mirko Friedenhagen
> I have setup a simple multi module project (see
which uses git on github as {{scm}}. While rendering the site, MPIR will by default add the
name of the module to the SCM-URLs in source-repository.html. So instead of
I see,
and git:// in the report for the core
module. All these URLs are invalid. For SVN this could be assumed to be the right behaviour,
for git and probably other SCMs this is not true. As a workaround I have to reconfigure the
scm section (see
in the modules like this:
> {code:xml}
> <scm>
>   <connection>${project.parent.scm.connection}</connection>
>   <developerConnection>${project.parent.scm.developerConnection}</developerConnection>
>   <url>${project.parent.scm.url}</url>
> </scm>
> {code}

This message was sent by Atlassian JIRA

View raw message