Hi all,
I am trying to setup a working instance of continuum, building maven
projects using perforce as scm provider.
After some googling, I decided to try the lastest version of continuum,
1.2-SNAPSHOT and the lastest version of maven-scm, 1.1-SNAPSHOT. I am
using The Perforce Windows Client Unicode Version 2005.2.93627.
I eventually managed to get it working, after some pain I must say.
I had to patch two files in maven-scm-provider-perforce:
PerforceLoginCommand.java and PerforceCheckOutConsumer.java.
PerforceLoginCommand.java
-------------------------
Basically, skip p4 login, but pretend it is successful.
---
D:\_\maven\maven-scm-provider-perforce\src\main\java\org\apache\maven\sc
m\provider\perforce\command\login\PerforceLoginCommand.java
2008-07-01 21:06:02.000000000 +-0200
+++
D:\_\maven\maven-scm\maven-scm-providers\maven-scm-provider-perforce\src
\main\java\org\apache\maven\scm\provider\perforce\command\login\Perforce
LoginCommand.java 2008-07-01 19:40:24.000000000 +-0200
@@ -44,12 +44,22 @@
implements PerforceCommand
{
public LoginScmResult executeLoginCommand( ScmProviderRepository
repo, ScmFileSet files, CommandParameters params )
throws ScmException
{
+ if (true) {
+ return new LoginScmResult(
+ "aze",
+ "no Login",
+ "no output",
+ true);
+ }
Commandline cl = createCommandLine(
(PerforceScmProviderRepository) repo, files.getBasedir() );
+ getLogger().debug( "[AZE] LoginCommand: " + cl );
PerforceLoginConsumer consumer = new PerforceLoginConsumer();
try
{
Process proc = cl.execute();
PerforceCheckOutConsumer.java
-----------------------------
Do not test the first letter from the perforce console output as it can
be uppercase or lowercase.
---
D:\_\maven\maven-scm-provider-perforce\src\main\java\org\apache\maven\sc
m\provider\perforce\command\checkout\PerforceCheckOutConsumer.java
2008-07-01 21:06:01.000000000 +-0200
+++
D:\_\maven\maven-scm\maven-scm-providers\maven-scm-provider-perforce\src
\main\java\org\apache\maven\scm\provider\perforce\command\checkout\Perfo
rceCheckOutConsumer.java 2008-07-01 19:50:21.000000000 +-0200
@@ -89,13 +89,13 @@
{
currentState = STATE_NORMAL;
return;
}
// Handle case where the clientspec is current
- if ( currentState == STATE_NORMAL && line.indexOf( "file(s)
up-to-date" ) != -1 )
+ if ( currentState == STATE_NORMAL && line.indexOf( "ile(s)
up-to-date" ) != -1 )
{
return;
}
if ( currentState != STATE_ERROR && fileRegexp.match( line ) )
{
My question:
Is there a correct way to get continuum, maven-scm and perforce to work
together, rather these questionable patches?
Optionaly:
Is there an article, a blog somewhere that better documents perforce
maven-scm?
Thanks
Christophe