Search code examples
maventfsmaven-release-plugin

xxx cannot be deleted because it is not empty. TFS release:perform


I am trying to make a release with tfs. I am stuck at mvn release:perform now. I finished mvn release:prepare successfully and then tried mvn release:perform and got this error:

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building releaseTestName 1.13-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.5.3:perform (default-cli) @ releaseTestName ---
[INFO] Checking out the project to perform the release ...
[INFO] scmUrl - xxx
[INFO] workspace: myWorkSpace
[INFO] checkinPolicies: True
[INFO] Scheme - https
[INFO] Command line - cmd.exe /X /C "tf workspace -login:xxx -new "-comment:Creating workspace for maven command" -server:xxx"
[INFO] err - The underlying connection was closed: An unexpected error occurred on a send.

[INFO] Command line - cmd.exe /X /C "tf workfold -login:xxx -unmap xxx"
[INFO] err - xxx does not match any mapping.

[INFO] Command line - cmd.exe /X /C "tf workfold -login:xxx -map xxx C:\..\..\target\checkout"
[INFO] err -
[INFO] Command line - cmd.exe /X /C "tf get -login:xxx -recursive -force -version:LreleaseTestName-1.12 C:\..\..\target\checkout"
[INFO] err - xxx cannot be deleted because it is not empty.
xxx cannot be deleted because it is not empty.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:perform (default-cli) on project releaseTestName: Unable to checkout from SCM
[ERROR] Provider message:
[ERROR] Error code for TFS checkout (get) command - 0
[ERROR] Command output:
[ERROR] xxx cannot be deleted because it is not empty.
[ERROR] xxx cannot be deleted because it is not empty.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

I also tried to specify a working directory somewhere outside this folder and received the same error. I Googled about this problem, and someone said that I should close all tabs that have this folder open, but I get the same error. Does someone know what the problem is? I'm guessing my scm is good because mvn release:prepare worked great.


Solution

  • I resolved my issue. I created new workspace in Microsoft visual studio and map my project somewhere outside all mapped folders. I had C:\Java mapped on some directory on TFS and then I create new dummy project inside C:\Java and tried to release that project and for some reason I couldn't do that. Then I mapped that dummy project somewhere on C:\test and this problem disappear. :)