Maven 2.x Release Plugin

release:prepare failed after a refactoring

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.0-beta-7
  • Fix Version/s: None
  • Component/s: prepare
  • Labels:
    None
  • Environment:
    Windows XP Pro SP2, maven-2.0.9, svn-1.4.5, java-1.6.0_03
  • Number of attachments :
    0

Description

The goal release:prepare failed if it is launched after a refactoring of a project.
By refactoring I mean change a package name or delete a directory.
So after doing this kind of refactoring if you try do to a release:prepare you got an error when the plugin try to create the tag in svn :
[INFO] Tagging release with the label maven-header-plugin-1.1...
[INFO] Executing: svn --non-interactive copy --file C:\DOCUME~1\GUILLA~1.IDE\LOCALS~1\Temp\maven-scm-896035269.commit . http://s-neptune/subversion2/sweetdev-forge/tags/maven-header-plugin-1.1
[INFO] Working directory: E:\projects\sweetdev-forge\trunk\maven-plugins\maven-header-plugin
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Unable to tag SCM
Provider message:
The svn tag command failed.
Command output:
svn: Commit failed (details follow):
svn: Directory 'E:\projects\sweetdev-forge\trunk\maven-plugins\maven-header-plugin\src\main\java\com\ideo\sweetdevria' is missing

I must create a fresh checkout of my project for the release:prepare goal to work.

Activity

Hide
Boris Maras added a comment -

I have exactly the same problem.
The missing directory is a d:\...\PRO\trunk\client
"client" is a module that used to exist in a previous version (2 months ago). It has been deleted since that moment, and 2 successfull releases have been made in between.
This module has, of course, been deleted in the master pom.xml (<modules> part)

We used Maven 2.0.8 and recently upgraded to Maven 2.0.9. We also use version 2.0-beta-7 of the plugin, and our svn client and server are also in version 1.4.5. We use sun jdk 1.6.0_10 under Windows XP Pro SP2

My temporary workaround has been to re-create this directory by hand (without declaring it in the master pom). But I'll need to delete it in the long term and I'm afraid I'll have the same problems for next release.

Show
Boris Maras added a comment - I have exactly the same problem. The missing directory is a d:\...\PRO\trunk\client "client" is a module that used to exist in a previous version (2 months ago). It has been deleted since that moment, and 2 successfull releases have been made in between. This module has, of course, been deleted in the master pom.xml (<modules> part) We used Maven 2.0.8 and recently upgraded to Maven 2.0.9. We also use version 2.0-beta-7 of the plugin, and our svn client and server are also in version 1.4.5. We use sun jdk 1.6.0_10 under Windows XP Pro SP2 My temporary workaround has been to re-create this directory by hand (without declaring it in the master pom). But I'll need to delete it in the long term and I'm afraid I'll have the same problems for next release.
Hide
Tuomas Kiviaho added a comment -

Same here with Maven 2.0.10
[INFO] ------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------
[INFO] Unable to tag SCM
Provider message:
The svn tag command failed.
Command output:
svn: Directory 'src' is missing

Steps to reproduce.
1. Checkout a project
2. Delete a direct sub folder already in svn and commit the change.
3. release:prepare --> FAIL
4. Re-checkout the same project in different location
5. release:prepare --> OK

Show
Tuomas Kiviaho added a comment - Same here with Maven 2.0.10 [INFO] ------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------ [INFO] Unable to tag SCM Provider message: The svn tag command failed. Command output: svn: Directory 'src' is missing Steps to reproduce. 1. Checkout a project 2. Delete a direct sub folder already in svn and commit the change. 3. release:prepare --> FAIL 4. Re-checkout the same project in different location 5. release:prepare --> OK
Hide
Grzegorz Slowikowski added a comment -

I have the same problem, but I think it's caused by svn client, not by release plugin. This is only my guess. I'm using SmartSvn client (it uses svnkit internally). Maven release plugin uses native svn client (svn.exe on windows), but if svn admin area on your local copy is somewhat damaged earlier then you have problems.

Show
Grzegorz Slowikowski added a comment - I have the same problem, but I think it's caused by svn client, not by release plugin. This is only my guess. I'm using SmartSvn client (it uses svnkit internally). Maven release plugin uses native svn client (svn.exe on windows), but if svn admin area on your local copy is somewhat damaged earlier then you have problems.
Hide
Tuomas Kiviaho added a comment -

Provider seems to be responsible indeed (as the error log states). For me a simple cleanup of workspace recovered the problem in above sample. The plugin try to cleanup the workspace before preparation but it might not be always appropriate (unwanted side effects etc.). Provider API might also prevent the implementation.

Show
Tuomas Kiviaho added a comment - Provider seems to be responsible indeed (as the error log states). For me a simple cleanup of workspace recovered the problem in above sample. The plugin try to cleanup the workspace before preparation but it might not be always appropriate (unwanted side effects etc.). Provider API might also prevent the implementation.

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated: