【问题标题】:SCM URL of local GIT repo本地 GIT 仓库的 SCM URL
【发布时间】:2018-05-04 05:44:04
【问题描述】:

我正在尝试使用我的本地 git repo 测试 mvn release 插件。我收到错误 没有提供 SCM URL 来执行发布,即使父 pom 有以下详细信息

<scm>
    <url>scm:git:file://localhost/d/Research/Research.git</url>
    <connection>scm:git:file://localhost/d/Research/Research.git</connection>
    <developerConnection>scm:git:file://localhost/d/Research/Research.git</developerConnection>
</scm>

这是在 mvn 中定义本地 repo 的正确方法吗?

【问题讨论】:

  • 根据maven.apache.org/scm/git.html 看起来是正确的- .git 后缀有问题吗? url 通常只是一个没有提供者信息的链接:maven.apache.org/pom.html#SCM
  • @wemu ,.git 应该在那里。我检查了我的项目的 pom(它正在使用实际的远程 git repo)在 url 中有 .git。
  • 遥控器做得很好。但你指向一个本地目录。并不是说此路径解析与 git 服务器的行为方式不同。只是作为一个实验:)
  • 感谢您的意见@wemu。设法让它工作。

标签: git maven maven-release-plugin


【解决方案1】:

终于设法让它工作了。因为我在 Windows 上,所以我在 scm 标签下使用了

<scm>
<url>scm:git:file://d:/Research/.git</url>
<connection>scm:git:file://d:/Research/.git</connection>
<developerConnection>scm:git:file://d:/Research/.git</developerConnection>

感谢@wemu 的投入。

【讨论】:

  • 如果有效,请接受您自己的答案,以便其他人看到问题已得到解答:)
猜你喜欢
  • 1970-01-01
  • 2013-10-02
  • 1970-01-01
  • 2019-06-22
  • 1970-01-01
  • 2013-08-05
  • 2017-06-17
  • 2019-02-22
  • 2012-01-05
相关资源
最近更新 更多