Java Mailing List Archive

http://www.java2.5341.com/

Home » issues.maven »

[jira] Created: (SCM-422) Error editing a Starteam file

Jan Bartel (JIRA)

2008-10-20

Replies: Find Java Web Hosting

Author LoginPost Reply
Error editing a Starteam file
-----------------------------

          Key: SCM-422
          URL: http://jira.codehaus.org/browse/SCM-422
        Project: Maven SCM
      Issue Type: Bug
      Components: maven-scm-provider-starteam
  Affects Versions: 1.1
     Environment: Maven 2.0.9, Windows XP, jre 1.5, Borland Starteam 2008
       Reporter: Ausiàs Armesto
     Attachments: starteam-edit-patch.txt

Hello,

I am trying to use the maven-release-plugin against the Borland Starteam SCM provider and during the execution of release:prepare the goal throws an errror because it maven-release-plugin has no access to edit pom file. Here I show you the message error.

[INFO] [release:prepare]
[INFO] Resuming release from phase 'rewrite-poms-for-release'
[INFO] Transforming 'Project Example'...
[INFO] Working directory: C:\StarteamServer\StarteamProject\StarteamView\ProjectExample
[INFO] Command line: stcmd lck -x -nologo -stop -p user@(protected)
[WARNING] Unknown edit ouput: Folder: SRRU (working directory: C:\StarteamServer\StarteamProject\StarteamView\ProjectExample)

[WARNING] Unknown edit ouput: pom.xml: Locked
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error writing POM: C:\IS\ISEJEMPLO\DYC\ispob\SRRU\pom.xml (Acces denied)

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Mon Oct 20 13:50:30 CEST 2008
[INFO] Final Memory: 7M/14M
[INFO] ------------------------------------------------------------------------


I have realized that the maven-release-plugin uses the following starteam command:
stcmd lck -x -nologo -stop -p user:password@(protected)

This command doesn't work if the Starteam project has checked the policy : "Mark unlocked working files read-only". This policy makes any file checked out as a read-only file in the working directory. An when a lock operation is performed changes the flag to allow writing to it. When a unlock operation is perform changes again the flag to restrict the read-only access.

The correction to the command is just add to the end the argument "-rw" as is shown below:
stcmd lck -x -nologo -stop -p user:password@(protected)


Here I provide the patch for the StarteamEditCommand.java and the fix for the test case

Do you want me to provide also the patch for the StarteamUnEditCommand.java?

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


©2008 java2.5341.com - Jax Systems, LLC, U.S.A.