Hi,
I am using the scm plugin with perforce every day with no problem. I do NOT
configure maven-scm-plugin in the plugins list. Maven seems to find the
appropriate plugin by itself.
My connection configuration looks like that:
<scm>
<connection>
scm:perforce:<my server>:1971://<folder path in the repository>
</connection>
<developerConnection>
scm:perforce:<my server>:1971://<folder path in the repository>
</developerConnection>
</scm>
I don't specify any user name or password in the pom: I have set a default
workspace using the P4 tools, and thus do not need to do so. Note that it makes
the POM user independent. When defining a workspace, do not define the 'Host'.
Another remark: if you still want to use snapshot plugins (sometimes, you have
no choice: see the maven-dependency plugin, for instance), you need to specify
a specific repository in your POM, like this:
<pluginRepositories>
<pluginRepository>
<id>apache-snapshots-repository</id>
<url>
http://people.apache.org/repo/m2-snapshot-repository
</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
Hope this helps,
Bruno
________________________________
From: Anirudh Chandrakant [mailto:[EMAIL PROTECTED]
Sent: lundi 11 décembre 2006 19:30
To: [EMAIL PROTECTED]
Subject: using Maven SCM with Perforce
Hi,
I am a beginner with maven and maven SCM. i tried to use Maven SCM with
Perforce. My pom.xml looks like this:
<project xmlns=" http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.test</groupId>
<artifactId>withPerforce</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>withPerforce</name>
<url>http://maven.apache.org</url>
<scm>
<connection>scm:perforce:[EMAIL PROTECTED] :3023://depot/myProj</connection>
</scm>
<build>
<plugins>
<plugin>
<groupId> org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<connectionType>connection</connectionType>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
--------------------------------------------------------------------
But, when i attempt to execute any scm command, i get the following error:
Reason: Unable to download the artifact from any repository
org.apache.maven.plugins:maven-scm-plugin:pom:1.0-SNAPSHOT
My configuration file is configured right, it can download the other plugins
required from the repository.
Could you please let me know if i am doing anything wrong or have i missed out
on any configuration step.
Thanks in advance,
Anirudh