I just tried this and I don't think it works correctly.

Edit = please unlock and make this file available for me to change 
Unedit = please undo any of my changes, revert to repository version and lock it

The PrepareReleaseMojo is just doing:

        1. edit POM
        2. update POM
        3. unedit POM

You see that the last step will revert the changes in the second step so it 
effectively does nothing.  I think you just need to remove the third step.  The 
release:release goal should perform the CheckIn operation which will implicitly 
lock the file once it has been committed.  Or am I missing something?

mike

-----Original Message-----
From: Emmanuel Venisse [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 24, 2005 3:04 PM
To: scm-dev@maven.apache.org
Subject: Re: Clearcase unedit command

mvn -DuseEditMode=true release:prepare

I added it for clearcase

Emmanuel

Mike Perham a écrit :
> I'm trying to use release:prepare and it's obvious that the release 
> plugin does not work with locking SCM providers yet.  You need to call 
> the SCM 'edit' command to open the POM for write access in Perforce 
> and (I assume) Clearcase.  Shall I open a JIRA issue?
> 
> Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot 
> write released version of pom to:
> D:\perforce\depot\sandbox\mperham\scm-test\pom.xml
>         at
> org.apache.maven.plugins.release.PrepareReleaseMojo.writePom(PrepareRe
> le
> aseMojo.java:1487
> )
>         at
> org.apache.maven.plugins.release.PrepareReleaseMojo.transformPomToRele
> as
> eVersionPom(Prepa
> reReleaseMojo.java:782)
>         at
> org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRel
> ea
> seMojo.java:245)
>         at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugin
> Ma
> nager.java:399)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defau
> lt
> LifecycleExecutor
> .java:519)
>         ... 16 more
> Caused by: java.io.FileNotFoundException:
> D:\perforce\depot\sandbox\mperham\scm-test\pom.xml (Access  is denied)
>         at java.io.FileOutputStream.open(Native Method)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
>         at java.io.FileWriter.<init>(FileWriter.java:73)
>         at
> org.apache.maven.plugins.release.PrepareReleaseMojo.writePom(PrepareRe
> le
> aseMojo.java:1479
> )
> 
> -----Original Message-----
> From: Emmanuel Venisse [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 24, 2005 2:13 PM
> To: scm-dev@maven.apache.org
> Subject: Clearcase unedit command
> 
> Can you remind me what is the role of this command for clearcase?
> 
> Emmanuel
> 
> 
> 
> 
> 


Reply via email to