NDepend SonarQube集成生成java.lang.NullPointerException



当尝试将NDepend集成到SonarQube中时,会生成一个NullPointerException,表示"The property "sonar.cs.ndepend. .projectPath"必须设置(为绝对路径)"

我按照说明去做了,但是现在我不知所措。有什么想法吗?

NDepend版本:6.3.0 ProfessionalSonarQube版本:6.0

完整异常堆栈跟踪:

    ERROR: Error during SonarQube Scanner execution
java.lang.NullPointerException: The property "sonar.cs.ndepend.projectPath" must be set (to an absolute path).
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
    at org.sonar.plugins.ndepend.NDependConfiguration.checkAbsolutePath(NDependConfiguration.java:56)
    at org.sonar.plugins.ndepend.NDependConfiguration.ndependProjectPath(NDependConfiguration.java:47)
    at org.sonar.plugins.ndepend.NDependSensor.analyze(NDependSensor.java:84)
    at org.sonar.plugins.ndepend.NDependSensor.analyse(NDependSensor.java:78)
    at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
    at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
    at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
    at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:184)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
    at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241)
    at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236)
    at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:234)
    at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
    at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
    at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
    at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115)
    at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:118)
    at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
    at com.sun.proxy.$Proxy0.execute(Unknown Source)
    at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:240)
    at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
    at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)
    at org.sonarsource.scanner.cli.Main.execute(Main.java:72)
    at org.sonarsource.scanner.cli.Main.main(Main.java:60)

在执行MSBuild.SonarQube.Runner.exe时是否指定了sonar.cs. independent . projectpath变量:

MSBuild.SonarQube.Runner.exe begin/key:{SonarQube项目密钥}/name:{SQ项目名称}/version:{SQ项目版本}/d:sonar.cs.ndepend. exeprojectPath={ndproj的路径}

还是使用sonar-runner命令启动分析?

相关内容

  • 没有找到相关文章

最新更新