本文介绍了如何配置Maven-release以将Perforce用作SCM提供程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 maven发行插件创建以 Perforce 作为SCM的Java项目的发行版本.

I am trying to use the maven release plugin to create a released version of a Java project having Perforce as the SCM.

我的pom scm部分是:

My pom scm section is:

<scm>
  <connection>scm:p4:myperforcehostname:1666://mydepot/mycomponent</connection>
  <developerConnection>scm:p4:myperforcehostname:1666://mydepot/mycomponent</developerConnection>
  <url>http://myperforcehostname:1666</url>
</scm>

我还使用 P4Maven 插件和Maven版本插件:

Also I use the P4Maven plugin and the Maven Release Plugin:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-scm-plugin</artifactId>
  <version>1.4</version>
  <dependencies>
    <dependency>
      <groupId>com.perforce</groupId>
      <artifactId>p4maven</artifactId>
      <version>[2011,2012)</version>
    </dependency>
  </dependencies>
  <configuration>
    <connectionType>connection</connectionType>
    <username>myusernme</username>
    <password>mypassword</password>
    <includes>**</includes>
  </configuration>
</plugin>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-release-plugin</artifactId>
  <version>2.5</version>
</plugin>

调用"mvn release:prepare -DdryRun = true"时,我得到

When calling 'mvn release:prepare -DdryRun=true' I get

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5:prepare
(default-cli) on project mycomponent: The provider given in the SCM URL could not be found:
No such provider: 'p4'. -> [Help 1]

有什么想法吗?

我可以打电话给mvn scm:checkout.

推荐答案

事实证明,P4Maven并非开箱即用.我必须从Perforce页面下载它,并将其安装到我的存储库中(按照下载zip文件中的说明进行操作).之后,我可以成功地使用p4作为SCM提供程序.

It turned out that P4Maven comes not out of the box. I had to download it from the Perforce pages and install it into my repository (following the instructions in the download zip file). After that I could successfully use p4 as the SCM provider.

这篇关于如何配置Maven-release以将Perforce用作SCM提供程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 16:53