Search code examples
macossvnmavenosx-mountain-lion

SVN version in Maven tasks with SVNKit on MacOS


I am getting this error in a Maven build (mvn clean install) on a Mac with Mountain Lion

org.tmatesoft.svn.core.SVNException: svn: The path 'XYZ' appears to be part of Subversion 1.7 (SVNKit 1.4) or greater working copy rooted at '/Users/XYZ/workspace/XYZ'. Please upgrade your Subversion (SVNKit) client to use this working copy.

I had SVN installed as part of the Apple Command Line tools package and that gets installed at /usr/bin. I have installed the latest SVN as well but that got installed at /usr/local/bin. When the maven build runs, it does not pick up the latest SVN, it picks the older one and fails. Has anyone faced this kind of problem before? I think there are 2 options - 1) Somehow force maven to use the new installed SVN. 2) Upgrade the SVN installed as part of Apple' Command Line tools to the latest SVN. I have reinstalled Command Line tools with the latest version but it still sticks to the older version.

I dont control the pom.xml so modifying it is not a viable option.

Any pointers in resolving this would be much appreciated. Thanks!


Solution

  • This means your svn client is version 1.7 but the working copy(your project workspace) was checkout with the older version.

    It's simple by execute the following command at your project root directory, where the pom.xml is there.

    svn upgrade
    

    please note, the maven use the svn client which is in your OS path.

    After upgrade you should configure your IDE to use the version 1.7 as well. In my case I use the Eclipes Juno sr1 with Svnkit.

    Anyhow if you would not like to change the working copy or IDE configuration. There is an alternative by install the svn clinet 1.4/1.5/1.6 and set it active via OS path instead.

    I hope this may help.

    Regards,

    Charlee Ch.