I am trying to use the maven release plugin to create a released version of a Java project having Perforce as the 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>
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>
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]
Any ideas?
I am able to call mvn scm:checkout
.
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.