Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DistributionMgmt->Site->URL incorrectly set for site:stage #333

Open
kwin opened this issue Feb 4, 2025 · 9 comments
Open

DistributionMgmt->Site->URL incorrectly set for site:stage #333

kwin opened this issue Feb 4, 2025 · 9 comments

Comments

@kwin
Copy link
Contributor

kwin commented Feb 4, 2025

The distributionMgmt site URL in

<url>${project.scm.developerConnection}</url>
is pointing to a Git URL, e.g. scm:git:[email protected]:codehaus-plexus/plexus-sec-dispatcher.git (from https://github.com/codehaus-plexus/plexus-sec-dispatcher/blob/35804938db2feec87fabe24d75509cd0d8dc3c47/pom.xml#L20). However this value is evaluated for site:stage (https://maven.apache.org/plugins/maven-site-plugin/stage-mojo.html) to calculate the folder structure being created below target/staging (for multimodule sites).

By default the same value is also used by maven-scm-publish-plugin in https://maven.apache.org/plugins/maven-scm-publish-plugin/publish-scm-mojo.html#pubScmUrl. However this is already overwritten in

<pubScmUrl>${project.scm.developerConnection}</pubScmUrl>
. Therefore the distributionManagement.site.url should rather point to the HTTP URL of where the site is hosted!

@kwin
Copy link
Contributor Author

kwin commented Feb 4, 2025

@michael-o IMHO this is a bug in the maven-site-plugin, WDYT?

@michael-o
Copy link
Member

@michael-o IMHO this is a bug in the maven-site-plugin, WDYT?

Honestly, no.idea from the top.of.my head.

@kwin
Copy link
Contributor Author

kwin commented Feb 4, 2025

I created https://issues.apache.org/jira/browse/MSITE-1032 for this.

@slawekjaranowski
Copy link
Member

very strange ... last time when I released parent I don't have a problem
It is a bug only for multimodule site?

@kwin
Copy link
Contributor Author

kwin commented Feb 6, 2025

The other way around, only affects single module repos. There site:stage does not work correctly

@slawekjaranowski
Copy link
Member

if you set:

  <distributionManagement>
    <site>
      <id>github:gh-pages</id>
      <url>${project.scm.url}</url>
    </site>
  </distributionManagement>

in plexus-sec-dispatcher stage will be ok ... magic 😄

@slawekjaranowski
Copy link
Member

I would like to release a plexus-pom, and next plexus-languages - with JDK 24 support

Tested locally and looks ok.

Do you have any objections?

@kwin
Copy link
Contributor Author

kwin commented Feb 6, 2025

if you set:

  <distributionManagement>
    <site>
      <id>github:gh-pages</id>
      <url>${project.scm.url}</url>
    </site>
  </distributionManagement>

in plexus-sec-dispatcher stage will be ok ... magic 😄

This will break maven-scm-publish-plugin leveraging that element as well. Also I consider this a workaround to say the least..

@kwin
Copy link
Contributor Author

kwin commented Feb 6, 2025

No objections to a release though. Not sure yet how to fix this issue (if at all in the parent)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants