You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm-users@maven.apache.org by Ovidiu Feodorov <ov...@novaordis.com> on 2009/06/29 23:46:15 UTC
SCM SVN Provider fails on Windows with cygwin/svn because of "C:/"
prefix
I know this is not a new problem, I found several JIRA issues related to
it (SCM-213 <http://jira.codehaus.org/browse/SCM-213>, for example), all
reported "Resolved", but yet I am using Maven SCM 1.2 and the 2.0 Beta 9
release plug-in and , and I am still seeing it.
This is what happens in my case:
I am running mvn release:prepare for a multi-module project, (cygwin,
Windows) and the operation fails with:
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive commit --file
c:\Users\ovidiu\AppData\Local\Temp\maven-scm-1114844030.commit
--targets c:\Users\ovidiu\AppData\Local\Temp\maven-scm-59263-targets"
[INFO] Working directory:
c:\work\playground\maven\release-plugin-experiments
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Unable to commit files
Provider message:
The svn command failed.
Command output:
svn:
'/cygdrive/c/work/playground/maven/release-plugin-experiments/C:' is
not a working copy
svn: Can't open file
'/cygdrive/c/work/playground/maven/release-plugin-experiments/C:/.svn/entries':
No such file or directory
The temporary file maven-scm-xxxxx-targets contains
c:/work/playground/maven/release-plugin-experiments/pom.xml
C:/work/playground/maven/release-plugin-experiments/sub-module-one/pom.xml
which confuses svn. C:/work/playground/maven/release-plugin-experiments
is the correct project home, cygwin svn is bothered by the C:/ prefix.
It seems quite obvious that this could be handled by cygwin svn, but I
believe it could also be worked around from the Maven layer, with
minimum of effort, especially that Maven SCM already has Cygwin-related
configuration options. If Maven would generate maven-scm-xxxxx-targets
to contain cygwin paths Windows paths, that would quell svn.
The file list in maven-scm-xxxxx-targets is generated by
org.apache.maven.scm.provider.svn.svnexe.command.SvnCommandLineUtils.addTargets()
(https://svn.apache.org/repos/asf/maven/scm/tags/maven-scm-1.2/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/SvnCommandLineUtils.java).
SvnCommandLineUtils.addTargets() could take into consideration
Cygwin-related <svn-settings> (<useCygwinPath> and <cygwinMountPath>)
and build the paths accordingly. <useCygwinPath> and <cygwinMountPath>
are already there, and this was probably the hardest part (see
http://maven.apache.org/scm/subversion.html).
If you think this is a sensible solution that'll make the life of the
developers easier, and are willing to apply it, I'll submit the patch.
Or, it is also quite possible that I am totally missing something
obvious here, and I will be happy to be guided to the right path.
Cheers,
Ovidiu