Fix distributionManagement.site.url to use HTTP URL instead of SCM URL #380
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes the
distributionManagement.site.url
to point to the actual HTTP URL where the site is hosted (https://codehaus-plexus.github.io/plexus-pom/
) instead of the Git SCM URL (scm:git:https://github.com/codehaus-plexus/plexus-pom.git
).Problem
The
maven-site-plugin
'ssite:stage
goal usesdistributionManagement.site.url
to calculate the folder structure for staging sites (particularly important for multimodule projects). When this URL was set to a Git SCM URL, it couldn't properly map to a relative path structure, causing issues for projects inheriting from plexus-pom.For example, in a child project like plexus-sec-dispatcher, the SCM URL would be inherited as the site URL, which
site:stage
couldn't properly process.Solution
Changed
distributionManagement.site.url
from${project.scm.developerConnection}
to${project.url}
:This change is safe because:
Site publishing is unaffected: The
maven-scm-publish-plugin
explicitly overrides this with itspubScmUrl
parameter (set to${project.scm.developerConnection}
), so site publishing to GitHub Pages continues to work correctly.Semantically correct: The
distributionManagement.site.url
should point to where the site is hosted (the HTTP URL), not where it's published from (the SCM URL).Consistent with Maven documentation: The Maven documentation indicates this element should contain the URL where the site can be accessed.
Testing
mvn clean verify
passesmvn site
works correctlymvn site:stage
now properly uses the HTTP URLFixes #XXX (replace with issue number)
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
www.apache.org
/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.11/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.11/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.11 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.11/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/plexus-pom/plexus-pom org.codehaus.plexus.classworlds.launcher.Launcher site
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.