title: Error in SonarQube when launching svn blame
body: <p>I recently upgraded my SonarQube server from 4.5.2 to 5.0.1, then to 5.1 (see edit below).</p>
  
  <p>Suddenly, the analysis of a multi-module Maven project failed with the following error :</p>
  
  <pre><code>[INFO] [12:02:05.045] Sensor SCM Sensor...
  [INFO] [12:02:05.169] SCM provider for this project is: svn
  [INFO] [12:02:05.169] Retrieve SCM blame information...
  [INFO] [12:02:05.185] 650 files to be analyzed
  [INFO] ------------------------------------------------------------------------
  [INFO] Reactor Summary:
  [INFO]
  [INFO] myproject ......................................... FAILURE [3:21.165s]
  [INFO] module1 ........................................... SKIPPED
  [INFO] module2 ........................................... SKIPPED
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 2:42.429s
  [INFO] Finished at: Thu Feb 26 11:30:01 CET 2015
  [INFO] Final Memory: 73M/2020M
  [DEBUG] [11:30:01.789] Executing: svn blame --xml --non-interactive -x -w src/main/java/MyClass.java
  [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project myproject: java.io.IOException: Cannot run progra
  m "svn" (in directory "C:\somedirectory\module1"): CreateProcess error=2, The system cannot find the file specified
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  Caused by: org.apache.maven.plugin.MojoExecutionException: java.io.IOException: Cannot run program "svn" (in directory "C:\somedirectory\module1"): CreateProcess error=2, The system cannot find the file specified
          at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:41)
          at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:139)
          at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:138)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
          ... 19 more
  </code></pre>
  
  <p>Somehow, the command <code>svn</code> did not find the file <code>src/main/java/MyClass.java</code> in directory <code>C:\somedirectory\module1</code>, although that file is definitely there. If I copy-paste the command SonarQube is trying to execute in a command prompt <code>svn blame --xml --non-interactive -x -w src/main/java/MyClass.java</code> inside directory <code>C:\somedirectory\module1</code> then the command is working fine.</p>
  
  <p><code>svn</code> command is correctly on the PATH, as can be seen in the "Library Path" field on "System Info" page in SonarQube server. SonarQube server is hosted on the same server where <code>mvn sonar:sonar</code> was executed (Windows Server 2008 R2).</p>
  
  <p><code>svn</code> is being launched by SonarQube to retrieve blame history. As I understand, <a href="http://www.sonarqube.org/sonarqube-5-0-in-screenshots/#more-10973" rel="noreferrer">there were some changes made in SonarQube 5.0 concerning SCM support</a> (change to built-in). My workaround for now is to disable the SCM sensor in SonarQube (using <code>-Dsonar.scm.disabled=true</code> or directly in the SonarQube server, under "Settings > General Settings > SCM").</p>
  
  <p>This is not related to <a href="https://stackoverflow.com/questions/28499470/error-in-jenkins-during-sonar-analysis-caused-by-svn-blame">this question</a> since I only encountered that behaviour when I upgraded to SonarQube 5.0.1.</p>
  
  <p>JRE used : 1.7.0_51 (64 bits)</p>
  
  <p><strong>EDIT :</strong></p>
  
  <p>After an upgrade to SonarQube 5.1, the error is still here but the message is different and more clear. I have reinstalled a SVN client (TortoiseSVN) and restarted both Jenkins and SonarQube but the error stays:</p>
  
  <blockquote>
    <p>SCM provider was set to "svn" but no SCM provider found for this key. No SCM provider installed</p>
  </blockquote>
  
  <pre><code>[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project bombardier: SCM provider was set to "svn" but no SCM provider found for this key. No SCM provider installed -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project bombardier: SCM provider was set to "svn" but no SCM provider found for this key. No SCM provider installed
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  Caused by: org.apache.maven.plugin.MojoExecutionException: SCM provider was set to "svn" but no SCM provider found for this key. No SCM provider installed
      at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:41)
      at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:139)
      at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:138)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      ... 19 more
  Caused by: java.lang.IllegalArgumentException: SCM provider was set to "svn" but no SCM provider found for this key. No SCM provider installed
      at org.sonar.batch.scm.ScmConfiguration.setProviderIfSupported(ScmConfiguration.java:123)
      at org.sonar.batch.scm.ScmConfiguration.considerOldScmUrl(ScmConfiguration.java:133)
      at org.sonar.batch.scm.ScmConfiguration.start(ScmConfiguration.java:109)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
      at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
      at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
      at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
      at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
      at org.picocontainer.behaviors.Stored.start(Stored.java:110)
      at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015)
      at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008)
      at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766)
      at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:91)
      at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
      at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
      at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
      at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135)
      at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
      at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
      at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158)
      at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
      at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
      at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
      at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
      at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
      at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
      at org.sonar.runner.api.Runner.execute(Runner.java:100)
      at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:135)
      ... 22 more
  </code></pre>