svnmavenreleaseplexus

Infinite recursion bug in Maven release / scm tag / Plexus DirectoryScanner?


I'm seeing my Maven release fail at the scm tagging phase with an apparent infinite recursion inside the release plugin:

... (hundreds more times)
at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:491)
at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:491)
at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:491)
at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:491)
at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:346)
at org.codehaus.plexus.util.FileUtils.getFileAndDirectoryNames(FileUtils.java:1886)
at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1813)
at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1795)
at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1769)
at org.apache.maven.scm.provider.svn.svnexe.command.tag.SvnTagCommand.executeTagCommand(SvnTagCommand.java:172)
at org.apache.maven.scm.command.tag.AbstractTagCommand.executeCommand(AbstractTagCommand.java:81)
at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59)
at org.apache.maven.scm.provider.svn.AbstractSvnScmProvider.executeCommand(AbstractSvnScmProvider.java:388)
at org.apache.maven.scm.provider.svn.AbstractSvnScmProvider.tag(AbstractSvnScmProvider.java:368)
at org.apache.maven.scm.provider.AbstractScmProvider.tag(AbstractScmProvider.java:846)
at org.apache.maven.shared.release.phase.ScmTagPhase.execute(ScmTagPhase.java:127)
...

The build looks OK to that point:

[INFO] Working directory: /Users/srowen/Documents/Development/ZXing
[INFO] Tagging release with the label zxing-2.2...
[INFO] Executing: /bin/sh -c cd /Users/srowen/Documents/Development/ZXing && svn --non-interactive copy --file /var/folders/tx/g74p23497xz89k7ngn6_6ykr0000gn/T/maven-scm-1363236967.commit --revision 2758 https://zxing.googlecode.com/svn/trunk https://zxing.googlecode.com/svn/tags/zxing-2.2
[INFO] Working directory: /Users/srowen/Documents/Development/ZXing

Has anyone seen anything like this? does it ring a bell that might suggest some local problem? There are no symlinks, no especially deep directory structures involved here.


Solution

  • It turns out that there was a symlink deep in the directory structure, that pointed back to a parent directory. Once removed this problem went away. I assume it caused an infinite loop in tagging directories recursively, one which I might have expected is detected and handled though by the tool.