Konrad Windszus opened MSITE-1033 and commented
The method getTopLevelProject(project) (
|
protected MavenProject getTopLevelProject(MavenProject project) throws MojoExecutionException { |
) 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
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 is an opaque URI according to https://docs.oracle.com/javase/8/docs/api/java/net/URI.html#isOpaque--)
Issue Links:
Remote Links:
Konrad Windszus opened MSITE-1033 and commented
The method
getTopLevelProject(project)(maven-site-plugin/src/main/java/org/apache/maven/plugins/site/deploy/AbstractDeployMojo.java
Line 508 in 5a0e56d
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/andscm:git:git@github.com:codehaus-plexus/plexus-sec-dispatcher.git/are incorrectly assumed to be the same because this URI is being parsed as(this is an opaque URI according to https://docs.oracle.com/javase/8/docs/api/java/net/URI.html#isOpaque--)
Issue Links:
MSITE-600 site plugin 3.0 does not permit a child to fully override parent site deployment URL
MSITE-1032 AbstractDeployMojo.getDeployModuleDirectory() does not work for Git SCM URLs
Remote Links: