You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Hervé Boutemy (JIRA)" <ji...@apache.org> on 2015/08/09 13:45:45 UTC

[jira] [Commented] (MPIR-234) SCM-link in site of multimodule projects should not append module name by default (at least for git)

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

Hervé Boutemy commented on MPIR-234:
------------------------------------

I'm thinking at this for a long time now, here is where I am for now:

First, the simplest idea: we can add easily in core a list of scms that don't require adding artifactId to scm connection and developerConnection (AFAIK, url is always expected to add artifactId): if the list is in a resource file, one can later add another file to extend the list

But if we do so, the scm.connection does not contain information about the path in scm: that's unfortunate, since I'm sure this would be useful for any tooling wanting to use data (like release).
Perhaps it would be better to extend git scm url: currently, it is documented in http://maven.apache.org/scm/git.html as {{scm:git:git://server_name[:port]/path_to_repository}} (other forms are similar)
if we extend it to {{scm:git:git://server_name[:port]/path_to_repository:path_in_repository}}, we can keep path info for tooling
and magically, the simple "add artifactId to path" algorithm is back to be a good algorithm

WDYT?

the feature request for directoryname != artifactId is a feature request that would just complement the algorithm: once someone finds an algorithm that can detect the path when not equals parent+artifactId and not during build (where current directory helps) but during resolution from repo, this will be ok
notice: perhaps flatten-maven-plugin can help us on this by expanding directory during install

> SCM-link in site of multimodule projects should not append module name by default (at least for git)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: MPIR-234
>                 URL: https://issues.apache.org/jira/browse/MPIR-234
>             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 https://github.com/mfriedenhagen/multi-module-sample/tree/multi-site-complex) 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 https://github.com/mfriedenhagen/multi-module-sample/ I see https://github.com/mfriedenhagen/multi-module-sample/core/, git@github.com:mfriedenhagen/multi-module-sample.git/core and git://github.com/mfriedenhagen/multi-module-sample.git/core 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 https://github.com/mfriedenhagen/multi-module-sample/blob/multi-site-complex/core/pom.xml) 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
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org