尝试分析Java项目代码时出错

时间:2014-09-01 18:53:50

标签: java eclipse maven eclipse-plugin sonarqube

我将Eclipse Sonar插件配置为指向我的SonarQube服务器,这没关系。我的Sonar Qube Server版本是3.7.4。我跟着this page

我在尝试通过Sonar Eclipse插件运行Sonar分析时遇到此错误。任何人都可以帮助我吗?

我在pom.xml文件中正确配置了标记:

        <scm>    
<connection>scm:svn:https://svnjiracloud.cit.com.br/repos/svn/PAPS/trunk/Fontes/PortalRAM/faturamento-auditorias-batch</connection>
          <developerConnection>scm:svn:https://svnjiracloud.cit.com.br/repos/svn/PAPS/trunk/Fontes/PortalRAM/faturamento-auditorias-batch</developerConnection>
          <url>https://svnjiracloud.cit.com.br/repos/svn/PAPS/trunk/Fontes/PortalRAM/faturamento-auditorias-batch</url>
        </scm>

        Error:
    15:36:05.138 INFO  - Execute PMD 4.3 done: 3865 ms
    15:36:05.161 INFO  - Sensor PmdSensor done: 3893 ms
    15:36:05.161 INFO  - Sensor org.sonar.plugins.scmstats.ScmStatsSensor@526018e0...
    Exception in thread "main" org.sonar.runner.impl.RunnerException: Unable to execute Sonar
        at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
        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.impl.BatchLauncherMain.execute(BatchLauncherMain.java:41)
        at org.sonar.runner.impl.BatchLauncherMain.main(BatchLauncherMain.java:59)
    Caused by: org.sonar.api.utils.SonarException: SCM URL must not be blank. Please check the parameter SCM URL or the <scm> section of Maven pom.
        at org.sonar.plugins.scmstats.UrlChecker.failure(UrlChecker.java:56)
        at org.sonar.plugins.scmstats.UrlChecker.check(UrlChecker.java:36)
        at org.sonar.plugins.scmstats.ScmStatsSensor.analyse(ScmStatsSensor.java:53)
        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:72)
        at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:114)
        at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:142)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
        at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
        at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:187)
        at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:182)
        at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:175)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
        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:82)
        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.BootstrapContainer.executeTask(BootstrapContainer.java:156)
        at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:144)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
        at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
        at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
        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)
        ... 6 more

2 个答案:

答案 0 :(得分:0)

source code from the org.sonar.stats.plugin明确指出您为SCM部分提供了一个空白网址。因此,由于您报告相关部分已填写,因此看起来很奇怪。可能是 Sonar Maven插件上的问题,请尝试浏览Issues Tracker

我认为禁用 Sonar SCM统计信息插件会让您解决此问题,因此如果它是适合您的合格解决方案,请尝试使用它。

答案 1 :(得分:0)

我解决了将 Scm Stats [scmstats] SonarQube服务器插件版本从 0.1 更新为 0.3.1

的问题

谢谢你们。