<svn-settings>
<useCygwinPath>true</useCygwinPath>
</svn-settings>
[...]
had no effect whatsoever when I first tried it, and then after looking
at
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,
I found out why, SvnCommandLineUtils, the code that generates the
content of the --targets file, doesn't even look at anything remotely
related to SCM configuration.
It is just:
for ( Iterator i = files.iterator(); i.hasNext(); )
{
File f = (File) i.next();
sb.append( f.getPath().replace( '\\', '/' ) );
sb.append( ls );
}
which dumps OS-dependent path representation into the text file.
The actual solution is different from what I suggested above. Even if
SvnCommandLineUtils.addTarget() generates cygwin-compliant absolute
paths, svn chokes with:
INFO] Unable to commit files
Provider message:
The svn command failed.
Command output:
svn: '/cygdrive' is not a working copy
svn: Can't open file '/cygdrive/.svn/entries': No such file
or directory
The way to make it work is to actually modify
SvnCommandLineUtils.addTarget() to write relative paths in the target
file. I have created a new JIRA issue
(http://jira.codehaus.org/browse/SCM-481) and attached the patch there,
in case the Maven team is interested in applying it. I haven't written
tests, but if they want to apply it, I will write tests too.
After applying the patch locally, release:prepare works great with
cygwin SVN.