You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2025/02/12 19:35:00 UTC
[jira] [Commented] (MSITE-1033) AbstractDeployMojo.getTopLevelProject(Project) returns wrong project for SCM URLs
[ https://issues.apache.org/jira/browse/MSITE-1033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17926558#comment-17926558 ]
Konrad Windszus commented on MSITE-1033:
----------------------------------------
[~michael-o] Any idea here? For Git I would say different SCM URL always means nothing is shared. For SVN this used to be different (as SVN is hierarchical while Git is not).
> AbstractDeployMojo.getTopLevelProject(Project) returns wrong project for SCM URLs
> ---------------------------------------------------------------------------------
>
> Key: MSITE-1033
> URL: https://issues.apache.org/jira/browse/MSITE-1033
> Project: Maven Site Plugin
> Issue Type: Bug
> Components: site:stage(-deploy)
> Reporter: Konrad Windszus
> Priority: Major
>
> The method {{getTopLevelProject(project)}} (https://github.com/apache/maven-site-plugin/blob/5a0e56d30c716821f922b9ee0981cda28284578f/src/main/java/org/apache/maven/plugins/site/deploy/AbstractDeployMojo.java#L508) returns the wrong project when all projects in the hierarchy have a "DistributionManagement->Site->URL" leveraging the SCM URL format: https://maven.apache.org/scm/scm-url-format.html (e.g. scm:git:git@github.com:codehaus-plexus/plexus-sec-dispatcher.git/). The method internally relies on https://github.com/apache/maven-doxia-sitetools/blob/9af3a745919525481e96bb4f0c18d62cf41446b4/doxia-site-model/src/main/java/org/apache/maven/doxia/site/inheritance/URIPathDescriptor.java#L191 which returns
> bq. true if ... shares the same scheme, host and port with the given URI.
> For example https://github.com/codehaus-plexus/plexus-sec-dispatcher/blob/master/pom.xml inherits from https://github.com/codehaus-plexus/plexus-pom/blob/master/pom.xml but for sure both projects don't share a common site. However the latter is returned as top project as
> {{scm:git:https://github.com/codehaus-plexus/plexus-pom.git/}} and {{scm:git:git@github.com:codehaus-plexus/plexus-sec-dispatcher.git/}} are incorrectly assumed to be the same because this URI is being parsed as
> # host = null
> # scheme = "scm"
> # port = -1
--
This message was sent by Atlassian Jira
(v8.20.10#820010)