jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 1.x SCM Plugin
  • MPSCM-67

scm:prepare-release fails because project.xml has been locally modified

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Reopened Reopened
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.5
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    Windows XP, Maven 1.0.2, Sun JDK 1.4.2_08, CVSNT 2.0.51 on localhost, maven-release-plugin-1.4.1

Description

This is weird. When I try to prepare a release using
maven scm:prepare-release
it complains that "project.xml has been locally modified".

Well, it's supposed to change that's the idea of running scm:prepare-release, right? Anyway, if I manually check in the modified project.xml and run the command again it succeeds.

Let me know if you need more information.

Here's the output I get:
------------------------------

G:\cvs\dennislundberg-codegeneration-HEAD>maven scm:prepare-release
__ __

\/ __ Apache_ ___
  \/ / ` \ V / -) ' \ ~ intelligent projects ~
_   _,_ _/___ _ _ v. 1.0.2

build:start:

scm:find-connection:
[echo] Using connection: scm|cvs|pserver|dlg01@localhost|C:/Program/cvsnt/repositories|dennislundberg-codegeneration

scm:parse-connection:
[echo] Using SCM method: cvs
[echo] Using CVSROOT: :pserver:dlg01@localhost:C:/Program/cvsnt/repositories
[echo] Using module: dennislundberg-codegeneration

scm:check-deprecated-cvs-vars:

scm:prepare-release:
[echo] Verifying no modifications are present
[INFO] Executing: cvs -f -n -q update -d
[INFO] Working directory: G:\cvs\dennislundberg-codegeneration-HEAD
What is the new tag name?
RELEASE-2_8
What is the new version? [RELEASE-2_8]
2.8
[echo] Updating POM with version 2.8; tag RELEASE-2_8

[echo] Committing descriptors
[echo] Tagging source tree
[WARNING] Unknown status: '? '.
[WARNING] Unknown status: '? '.
Provider message:
The cvs tag command failed.
Command output:
cvs server: project.xml is locally modified
cvs [server aborted]: correct the above errors first!

BUILD FAILED
File...... C:\Documents and Settings\dlg01\.maven\cache\maven-scm-plugin-1.5\plugin.jelly
Element... scm:tag
Line...... 244
Column.... 189
Error!
Total time: 29 seconds
Finished at: Mon Sep 26 17:25:24 CEST 2005

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    MPSCM-67.patch
    08/Jan/06 3:29 PM
    4 kB
    Dennis Lundberg
  2. Text File
    MPSCM-67-2.patch
    15/Jan/06 4:18 PM
    4 kB
    Dennis Lundberg

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Dennis Lundberg added a comment - 08/Jan/06 4:06 AM

The problem seems to be in maven-scm.

Show
Dennis Lundberg added a comment - 08/Jan/06 4:06 AM The problem seems to be in maven-scm.
Hide
Permalink
Dennis Lundberg added a comment - 08/Jan/06 3:29 PM

I finally got around to tracking this one down. It took a lot of digging, but I finally solved it. The root of the problem is that CVS will fail when tagging something if there are files included that are not under version control.

So when you do "maven scm:prepare-release" the maven-scm-plugin will first use maven-release-plugin and maven-changes-plugin to alter the files projekct.xml and xdocs/changes.xml. When doing this backup copies of these files are made. These files are not under version control. Later in the process the scm provider is used to tag the release. If you do this using CVS that command will fail because there are files that you have not checked in, the backup files.

This patch does these things:

  • Add an excludes property to the ScmBean
  • Use that excludes property in the SCMFileSet sent to the scm provider in the call to the tag() method
  • Altered plugin.jelly by adding an excludes attribute to the goals "tag" and "prepare:release". This attribute has the value "project.xml.backup,xdocs/changes.xml.backup". I wasn't sure about the "tag" goal, but I changed that as well. Feel free to remove the excludes attribute there if it is inappropriate.
  • Added this to xdocs/changes.xml. Need to change the dev attribute though
Show
Dennis Lundberg added a comment - 08/Jan/06 3:29 PM I finally got around to tracking this one down. It took a lot of digging, but I finally solved it. The root of the problem is that CVS will fail when tagging something if there are files included that are not under version control. So when you do "maven scm:prepare-release" the maven-scm-plugin will first use maven-release-plugin and maven-changes-plugin to alter the files projekct.xml and xdocs/changes.xml. When doing this backup copies of these files are made. These files are not under version control. Later in the process the scm provider is used to tag the release. If you do this using CVS that command will fail because there are files that you have not checked in, the backup files. This patch does these things:
  • Add an excludes property to the ScmBean
  • Use that excludes property in the SCMFileSet sent to the scm provider in the call to the tag() method
  • Altered plugin.jelly by adding an excludes attribute to the goals "tag" and "prepare:release". This attribute has the value "project.xml.backup,xdocs/changes.xml.backup". I wasn't sure about the "tag" goal, but I changed that as well. Feel free to remove the excludes attribute there if it is inappropriate.
  • Added this to xdocs/changes.xml. Need to change the dev attribute though
Hide
Permalink
Dennis Lundberg added a comment - 15/Jan/06 4:18 PM

New version of the patch, this time without absolute paths.

Show
Dennis Lundberg added a comment - 15/Jan/06 4:18 PM New version of the patch, this time without absolute paths.
Hide
Permalink
Lukas Theussl added a comment - 16/Jan/06 2:53 PM

Patch applied. Thanks!

Show
Lukas Theussl added a comment - 16/Jan/06 2:53 PM Patch applied. Thanks!
Hide
Permalink
Lukas Theussl added a comment - 29/Jan/06 4:01 PM

Dennis,
I have reverted your patch. When I tried a scm:prepare-release on a maven plugin, I got the following error:

org.apache.maven.scm.ScmException: This provider doesn't support tagging subsets of a directory

It works with your patch reverted.

Show
Lukas Theussl added a comment - 29/Jan/06 4:01 PM Dennis, I have reverted your patch. When I tried a scm:prepare-release on a maven plugin, I got the following error: org.apache.maven.scm.ScmException: This provider doesn't support tagging subsets of a directory It works with your patch reverted.
Hide
Permalink
Dennis Lundberg added a comment - 29/Jan/06 4:26 PM

So it would seem that the problem that I experienced is only a problem with CVS. And also that other scm providers does not work in the same way. I will try to make a new patch that takes this into consideration.

Show
Dennis Lundberg added a comment - 29/Jan/06 4:26 PM So it would seem that the problem that I experienced is only a problem with CVS. And also that other scm providers does not work in the same way. I will try to make a new patch that takes this into consideration.
Hide
Permalink
Lukas Theussl added a comment - 08/Feb/06 12:16 PM

Dennis,
I think with the fix for MPSCM-77 you should have a workaround for your problem (it allows you to remove the backup files by hand before committing and tagging). I'd like to release scm-plugin-1.6, so I will schedule this issue for a later release, is that ok?

Show
Lukas Theussl added a comment - 08/Feb/06 12:16 PM Dennis, I think with the fix for MPSCM-77 you should have a workaround for your problem (it allows you to remove the backup files by hand before committing and tagging). I'd like to release scm-plugin-1.6, so I will schedule this issue for a later release, is that ok?
Hide
Permalink
Dennis Lundberg added a comment - 12/Feb/06 9:34 AM

I'm OK with moving this issue to a later release, after all I have not provided a patch that work yet Need to set up a proper testing environment for this.

Hopefully I can find some time soon to try the fix for MPSCM-77. Do you have an ETA in mind for 1.6?

Show
Dennis Lundberg added a comment - 12/Feb/06 9:34 AM I'm OK with moving this issue to a later release, after all I have not provided a patch that work yet Need to set up a proper testing environment for this. Hopefully I can find some time soon to try the fix for MPSCM-77. Do you have an ETA in mind for 1.6?
Hide
Permalink
Lukas Theussl added a comment - 20/Feb/06 11:11 AM

I'd like to release this week.

Show
Lukas Theussl added a comment - 20/Feb/06 11:11 AM I'd like to release this week.

People

  • Assignee:
    Unassigned
    Reporter:
    Dennis Lundberg
Vote (0)
Watch (0)

Dates

  • Created:
    26/Sep/05 10:54 AM
    Updated:
    22/Jun/07 11:49 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.