当我的存储库不公开时,如何在 pom.xml 中为 Maven 设置 SCM?

问题描述 投票:0回答:1

我正在开发一个位于私人公司 GitLab 存储库中的 Java 库。它是供客户使用的 SDK 的一部分。我正在尝试弄清楚如何将其发布到 Maven Central,但我一直在 pom.xml 中设置 SCM 字段。

当存储库不公开时,我该如何设置这些字段?

我需要这样的东西:

  <!-- Define where the source code for this project lives -->
  <scm>
    <connection>scm:git:https://github.com/evansiroky/maven-semantic-release-example.git</connection>
    <developerConnection>scm:git:https://github.com/evansiroky/maven-semantic-release-example.git</developerConnection>
    <url>https://github.com/evansiroky/maven-semantic-release-example</url>
  </scm>
java maven pom.xml maven-central
1个回答
0
投票

SCM 字段可以指向私有存储库,URL 可以指向网站。

我最终这样做了:

<scm>
    <connection>scm:git:https://private-repo.com/private-repo.git</connection>
    <developerConnection>scm:git:https://private-repo.com/private-repo.git</developerConnection>
    <url>https://docs.mywebsite.com</url>
  </scm>
最新问题
© www.soinside.com 2019 - 2024. All rights reserved.