5

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.

Sean Owen
  • 66,182
  • 23
  • 141
  • 173
  • Can you show the pom file and the full stack trace (may be put on a gist on github) and which version of Maven, maven-release-plugin do you use? – khmarbaise May 14 '13 at 16:22
  • Here was the final version of the parent pom.xml file that didn't work: https://code.google.com/p/zxing/source/browse/trunk/pom.xml?spec=svn2761&r=2761 I'm on Maven 3.0.3, and the latest release plugin, 2.4.1. I can definitely supply more info if needed. There is not much more to the stack trace: above, more of the same, and below, just some boilerplate from the Maven framework. – Sean Owen May 14 '13 at 18:40
  • Do your build hangs on the "[INFO] Working directory:" line ? Or does it go over ? Do you encounter a ScmException after a while (eventually thrown by SvnTagCommand)? I saw that you made a rollback to remove the "multi-module" structure on your project. Do you have a guess about this "multi-module-related" problem ? –  May 22 '13 at 12:04
  • Yes, that's the last line of output. After 10-15 minutes it fails with an `OutOfMemoryError`. Yes, for whatever reason, things were fine when building and releasing each module independently. So I just went that way since the parent pom was not that necessary. I'd still be interested to know if it was fixable, or if it's not user error, I'll report a bug for it. – Sean Owen May 22 '13 at 13:15
  • 1
    In case you still want to give the multi-module a try, maybe next time you should run the release plugin with a full debug stacktrace to understand the problem better : `mvn release:prepare ... -X > /Users/srowen/Documents/mavenlog.txt`. In [ScmTagPhase.java](http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmTagPhase.java?view=markup), the content of the fileSet used by plexus' getFiles method is detailed. I give up for the moment, I don't have any serious answer to this problem. –  May 22 '13 at 14:43
  • Also I would suggest to look at upgrading to Maven 3.0.5 or at least 3.0.3 since there are a bunch of known issues with Maven 3.0.3 and the release plugin.. might be a side effect of those.. – Manfred Moser Jun 26 '13 at 05:38
  • Most likely scenario if you've tried all the other good suggestions is that somewhere a path is being set to `/` (root of drive), likely due to a missing variable substitution (for example, use of `/` instead of `${basedir}`). – Peter Mularien Jul 09 '13 at 16:24

1 Answers1

1

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.

Sean Owen
  • 66,182
  • 23
  • 141
  • 173