我正在尝试使用maven 发布插件来创建以Perforce作为 SCM 的 Java 项目的发布版本。
我的 pom scm 部分是:
<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 发布插件:
<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' 我得到
[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
。