You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by EJ Ciramella <ej...@upromise.com> on 2008/04/02 23:21:38 UTC

mvn release with perforce

Is anyone using this feature with perforce and maven 2?
 
I'm a little fuzzy with this particular plugin, but doesn't it depend on
the <scm> config specified at the top of the pom?
 
I have this:
 
  <scm>
 
<connection>scm:perforce:${p4.username}:${p4.password}@perforce://some/d
epot/path</connection>
    <url>http://someserver:somport/@md&eq;d&cd&eq;//somepath/</url>
  </scm>
 
What are others using for the <url> bit when using this plugin in
conjunction with perforce?
 
The release plugin doesn't like "=" in the url as well as my "&eq;"
things.
 
Thanks in advance!

RE: mvn release with perforce

Posted by sgargan <sg...@qualcomm.com>.
Hey there,

Perforce is more user oriented that most SCMs, you need to explicitly tell
it who you are and and how to map files from it's repository to your local
system using a specific 'client' specification. Typically these values are
set as environment variables e.g.

P4CLIENT=<your-client-spec>
P4USER=<your-user>
P4PASSWD=<your password>

# this is the server host and port
P4PORT=localhost:1666

You need to have these set to be able to use the 'p4' commandline anyhow. 

To use it with maven; Say you have a maven project named 'simple' checked
into your perforce repo at '//depot/simple', the scm tags in the project
file should read 

<scm>
        <connection>scm:perforce://depot/simple</connection>
       
<developerConnection>scm:perforce://depot/simple</developerConnection>
        <url>scm:perforce://depot/simple</url>
</scm>

Now you should be able to release your 'simple' project with the release
plugin. 

execute the following prepare step if you don't like the idea of having your
username or password set in env variables you can supply them to the commad
as follows
-Dusername=<youruser> -Dpassword=<yourpassword>

mvn release:prepare --batch-mode

The batchmode selects sensible defaults for the release version, label and
next version. If the prepare succeeds, finish it out using 

mvn release:perform

(this will also upload it to your enterpise maven artifact repository if
configured, e.g. archiva, nexus, maven-proxy)

if it fails roll it back with
mvn release:rollback

The release plugin page goes into this in more depth, so check it out. 

Hope this helps 

ste


EJ Ciramella-2 wrote:
> 
> Ok, made it a bit further - but I'm getting this now:
> 
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] The port has to be a number.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> 
> Clearly I have listed the port number, where is it missing from? 
> 
> -----Original Message-----
> From: EJ Ciramella [mailto:ejciramella@upromise.com] 
> Sent: Wednesday, April 02, 2008 5:22 PM
> To: users@maven.apache.org
> Subject: mvn release with perforce
> 
> Is anyone using this feature with perforce and maven 2?
>  
> I'm a little fuzzy with this particular plugin, but doesn't it depend on
> the <scm> config specified at the top of the pom?
>  
> I have this:
>  
>   <scm>
>  
> <connection>scm:perforce:${p4.username}:${p4.password}@perforce://some/d
> epot/path</connection>
>     <url>http://someserver:somport/@md&eq;d&cd&eq;//somepath/</url>
>   </scm>
>  
> What are others using for the <url> bit when using this plugin in
> conjunction with perforce?
>  
> The release plugin doesn't like "=" in the url as well as my "&eq;"
> things.
>  
> Thanks in advance!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/mvn-release-with-perforce-tp16461632s177p16656688.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: mvn release with perforce

Posted by javaty <pt...@bgcpartners.com>.
Hi Ste,

I'm facing issues with maven release plugin and perforce, I've followed the
steps as given by you in your post, I'm still getting the following error,
I'll be obliged if you can spare some thoughts on this.

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-release-plugin:2.2.2:rollback (default-cli)
on project mule-example-echo: Error restoring from backup POM: Unable to
open file C:\perforce\hostname\test
\echo\trunk\pom.xml for writing. -> [Help 1]


Kind Regards

--
View this message in context: http://maven.40175.n5.nabble.com/mvn-release-with-perforce-tp103605p5651585.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: mvn release with perforce

Posted by EJ Ciramella <ej...@upromise.com>.
Ok, made it a bit further - but I'm getting this now:

[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] The port has to be a number.
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch

Clearly I have listed the port number, where is it missing from? 

-----Original Message-----
From: EJ Ciramella [mailto:ejciramella@upromise.com] 
Sent: Wednesday, April 02, 2008 5:22 PM
To: users@maven.apache.org
Subject: mvn release with perforce

Is anyone using this feature with perforce and maven 2?
 
I'm a little fuzzy with this particular plugin, but doesn't it depend on
the <scm> config specified at the top of the pom?
 
I have this:
 
  <scm>
 
<connection>scm:perforce:${p4.username}:${p4.password}@perforce://some/d
epot/path</connection>
    <url>http://someserver:somport/@md&eq;d&cd&eq;//somepath/</url>
  </scm>
 
What are others using for the <url> bit when using this plugin in
conjunction with perforce?
 
The release plugin doesn't like "=" in the url as well as my "&eq;"
things.
 
Thanks in advance!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org