Versions in use:
- Sonarqube 5.1
- sonar-scm-svn-plugin 1.1
- JDK 1.7
We migrated recently from Sonarqube 4.5 to 5.1. Since then we have problems with generated files, when SVN Plugin processes them:
05:24:03 Caused by: org.tmatesoft.svn.core.SVNException: svn: E155007: '/var/lib/jenkins/workspace/cps-sonar/src/main/java/foo/Bar.java' is not a working copy
05:24:03 at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
05:24:03 at org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory.open(SVNAdminAreaFactory.java:170)
05:24:03 at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.doOpen(SVNWCAccess.java:379)
05:24:03 at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.open(SVNWCAccess.java:283)
05:24:03 at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.open(SVNWCAccess.java:276)
05:24:03 at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.openAnchor(SVNWCAccess.java:171)
05:24:03 at org.tmatesoft.svn.core.internal.wc16.SVNStatusClient16.doStatus(SVNStatusClient16.java:374)
05:24:03 at org.tmatesoft.svn.core.internal.wc2.old.SvnOldGetStatus.run(SvnOldGetStatus.java:22)
05:24:03 at org.tmatesoft.svn.core.internal.wc2.old.SvnOldGetStatus.run(SvnOldGetStatus.java:13)
05:24:03 at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
05:24:03 at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
05:24:03 at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
05:24:03 at org.tmatesoft.svn.core.wc.SVNStatusClient.doStatus(SVNStatusClient.java:363)
05:24:03 at org.tmatesoft.svn.core.wc.SVNStatusClient.doStatus(SVNStatusClient.java:422)
05:24:03 at org.tmatesoft.svn.core.wc.SVNStatusClient.doStatus(SVNStatusClient.java:384)
05:24:03 at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:72)
05:24:03 ... 57 more
The plugin is right, since the file is not in SVN. But instead of ignoring the file, the plugin fails.
Rather confusing, this bug seems to be fixed in sonar-scm-plugin-1.1 since April, but it's supposed to be compatible with Sonarqube 5.1.1+, which had just been released in June: http://docs.sonarqube.org/display/PLUG/SVN+Plugin . Do we need to migrate to 5.1.1 then?
A workaround so far is to ignore these files from Sonar-Analysis completely by exclusion patterns, which might look like a good idea in general, but I'd rather have even those files analysed, too.
This issue is supposed to be fixed by sonarqube-scm-svn-plugin 1.1. And it is compatible with SQ 5.1, this is an error in update center I'll fix quickly.
Maybe the error is caused because your working copy format is too old. What is the version of your SVN client you used to do the checkout?