3

I'm having issues with my maven and svn set up. I have recently been playing with git and now I'm seeing issues with SVN. I have a feeling an install forced SVN to update, but it doesn't look to be the case from the look of my installed software.

I am using cygwin, but the issues also arise when I try this through the command prompt.

The setup I have on my machine is:

  • svn, version 1.7.14 (r1542130)
  • Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 13:51:28+0000)
  • SlikSvn 1.7.17
  • Cygwin 1.7.29(0.272/5/3)

I am able to commit to SVN and update from it using Tortoise SVN (version 1.7.14) but whenever I try to release my application with the release:prepare and release:perform commands, I get the following failures. The issue is that the path for the checkout is being concatenated to itself.

[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD SUCCESS
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 23.693s
[INFO] [INFO] Finished at: Tue May 20 14:19:59 BST 2014
[INFO] [INFO] Final Memory: 17M/138M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive commit --file C:\cygwin\tmp\maven-scm-1575361850.commit --targets C:\cygwin\tmp\maven-scm-6249519314346478050-targets"
[INFO] Working directory: C:\Users\danielt\Workspace\Common\Adapters\Zuul\trunk
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35.022s
[INFO] Finished at: Tue May 20 14:19:59 BST 2014
[INFO] Final Memory: 13M/100M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project zuul-api: Unable to commit files
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: E155010: Commit failed (details follow):
[ERROR] svn: E155010: The node '/cygdrive/c/Users/danielt/Workspace/Common/Adapters/Zuul/trunk/C:/Users/danielt/Workspace/Common/Adapters/Zuul' was not found.
[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

The command I use is this:

mvn release:prepare -Dtag=1.8.30 -DreleaseVersion=1.8.30 -DdevelopmentVersion=1.8.31-SNAPSHOT -Dresume=false -DautoVersionSubmodules=true release:perform

The really bizarre thing is that maven is happy enough to check the local modifications as shown below.

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Zuul Api 1.8.30-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.0:prepare (default-cli) @ zuul-api ---
[INFO] Verifying that there are no local modifications...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive status"
[INFO] Working directory: C:\Users\danielt\Workspace\Common\Adapters\Zuul\trunk

If anyone is aware of any version incompatibilities between svn, maven and/or cywgin, I'd be really pleased to hear about them and try them out to see if they fix my issues.

Dan Temple
  • 2,736
  • 2
  • 22
  • 39
  • Based on the messages `/cygdrive/c/Users/danielt/Workspace/Common/Adapters/Zuul/trunk/C:/Users/danielt/Workspace/Common/Adapters/Zuul' was not found.` this looks like the problem. Are you running in Cygwin means running really windows or under cygwin? – khmarbaise May 20 '14 at 18:58
  • Yep, used cygwin here, but it does the same thing under DOS, probably due to the PATH environment variable. What I don't understand is why it picks up the path twice and puts them together – Dan Temple May 20 '14 at 20:48
  • First can you try to update [maven-release-plugin](maven.apache.org/maven-release/maven-release-plugin/) cause you are using an really old version. The current version is 2.5. – khmarbaise May 21 '14 at 06:03
  • I tried updating the plugin version, but to no avail. I did some more browsing this morning and found a Maven Jira post about this problem. The PATH variable was in the wrong order! – Dan Temple May 21 '14 at 07:01
  • @khmarbaise I'm going to edit the question and answer it myself so this remains as an accurate reference of the issue. Thanks for the help. – Dan Temple May 21 '14 at 07:08

1 Answers1

4

Thank god for this maven issue I found while trying to solve this issue this morning.

The comment from Samuel Kerrien on 31/Mar/07 pointed me to my PATH variable.

I have had the same problem and making sure that Windows' subversion was upstream of cygwin in the PATH did the trick. Hope that helps

Basically, this came down to an issue with the PATH variable and order of the components.

I had:

...
C:\cygwin\bin;
...
C:\Program Files\SlikSvn\bin;
...

But the windows version of SVN needs to be first for mvn to pick up the correct file paths and not the relative ones from cygwin. So changing it to be:

...
C:\Program Files\SlikSvn\bin;
...
C:\cygwin\bin;
...
Dan Temple
  • 2,736
  • 2
  • 22
  • 39