我正在尝试将我们的存储库从 SVN 迁移到 Git,但我在一个非常大的项目中遇到了发布插件的问题。
问题:
这个项目有大约 50 多个子模块,它尝试将所有修改过的 pom 添加为一个 'git add --'。这打破了 Windows 命令行限制。
幸运的是,在 maven-scm-provider-gitexe 的 1.8.1 版本中对此进行了修复,但是 maven-release-plugin 当前设置为使用没有修复的 1.7。
我尝试将以下内容添加到我的根 pom.xml,但我仍然可以看到它在 mvn release:prepare 期间下载 1.7,甚至在详细模式下运行该进程也没有表明它正在使用 1.8.1。
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-release-plugin</artifactId>
    <version>2.3.2</version>
    <executions>
      <execution>
        <id>default</id>
        <goals>
          <goal>perform</goal>
        </goals>
        <configuration>
          <pomFileName>subproj/pom.xml</pomFileName>
        </configuration>
      </execution>
    </executions>
    <dependencies>
      <dependency>
        <groupId>org.apache.maven.scm</groupId>
        <artifactId>maven-scm-api</artifactId>
        <version>1.8.1</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.scm</groupId>
        <artifactId>maven-scm-provider-gitexe</artifactId>
        <version>1.8.1</version>
      </dependency>
    </dependencies>
  </plugin>
我还尝试将以下内容添加到 pom.xml 中,以防它强制使用正确的版本而没有更多的运气。
<extensions>
    <extension>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-gitexe</artifactId>
      <version>1.8.1</version>
    </extension>
</extensions>    
我怀疑它没有使用 1.8.1 的原因是它仍然无法尝试对所有 pom 文件进行 git add 操作,而我已经检查了插件源代码,它肯定看起来应该为 Windows 单独添加每个文件(我甚至仔细检查了 codehaus plexus Os.isFamily(Os.FAMILY_WINDOWS) 以确保在我的机器上返回 true。
我错过了什么?如何强制发布插件使用正确版本的 scm 插件?