2016-08-18 10 views
1

NDearをSonarQubeに統合しようとすると、プロパティ "sonar.cs.ndepend.projectPath"を絶対パスに設定する必要があるというNullPointerExceptionが発生します。NDepend SonarQubeとの統合により、java.lang.NullPointerExceptionが生成される

私はinstructionsに従っていますが、今私は迷っています。任意のアイデア、誰ですか?

NDependのバージョン:6.3.0プロフェッショナル SonarQubeバージョン: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) 

答えて

1

MSBuild.SonarQubeを実行するときにsonar.cs.ndepend.projectPath変数を指定してください。 Runner.exe

MSBuild.SonarQube.Runner.exe begin/key:{SonarQubeプロジェクトキー} /名前:{SQプロジェクト名} /バージョン:{SQプロジェクトバージョン} /d:sonar.cs。 ndepend.projectPath = {パットhのndproj}

または、ソナーランナーコマンドを使用して分析を開始しますか?

関連する問題