我有一个Git存储库,它包含几个Maven模块,使用Maven继承和Maven聚合.也就是说,在根目录中,有一个父POM,它定义了一些模块,每个模块都使用该根POM作为它们的父模块.
<project>
  …
  <groupId>io.example</groupId>
  <artifactId>parent</artifactId>
  <version>1.2.3-SNAPSHOT</version>
  <packaging>pom</packaging>
  …
  <scm>
    <connection>scm:git:https://bitbucket.org/example/foobar.git</connection>
    <developerConnection>scm:git:https://bitbucket.org/example/foobar.git</developerConnection>
    <url>https://bitbucket.org/example/foobar</url>
  </scm>
  …
  <modules>
    <module>foo</module>
    <module>bar</module>
  </modules>
  …
我最近发现 Maven会将模块路径附加到<scm><url>每个模块(foo及bar以上)的值.例如,foo子模块将获得SCM URL https://bitbucket.org/example/foobar/foo.
那么我的每个模块都应该重新声明该<scm>部分,以便子模块POM具有与父POM相同的SCM URL吗?无论如何,Nexus Staging Maven插件如何使用此SCM信息?
我也在Sonatype交叉发布了这个.
关于标题中的最初问题:鉴于github提供的代码,它不使用它。当您在所有 .java 文件中搜索“scm”时,您的命中率为零。当然,他们可以做一些奇怪的技巧,例如构建字符串"s" + "c" + "m",或者将其隐藏在某些第三方依赖项中,或者......我仍然认为除了官方答案之外,这是任何外人都可以说的最好的答案。
| 归档时间: | 
 | 
| 查看次数: | 244 次 | 
| 最近记录: |