获得"运行SonarLint分析时出错java.lang.IllegalStateException:没有文件或目录匹配"在Jenkins插件上运行sonarlint时

时间:2016-10-09 12:56:10

标签: jenkins sonarlint

我尝试在项目的Jenkins插件中使用SonarLint Intellij插件时遇到以下错误 -

Error running SonarLint analysis
java.lang.IllegalStateException: No files nor directories matching 'C:/Users/XXXX/.m2/repository/org/jenkins-ci/main/jenkins-war/1.642.4/jenkins-war-1.642.4.war'
    at org.sonar.java.AbstractJavaClasspath.getFilesFromProperty(AbstractJavaClasspath.java:90)
    at org.sonar.java.JavaClasspath.init(JavaClasspath.java:50)
    at org.sonar.java.AbstractJavaClasspath.getElements(AbstractJavaClasspath.java:258)
    at org.sonar.java.SonarComponents.getJavaClasspath(SonarComponents.java:122)
    at org.sonar.java.JavaSquid.<init>(JavaSquid.java:78)
    at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:86)
    at org.sonarsource.sonarlint.core.analyzer.sensor.SensorWrapper.analyse(SensorWrapper.java:52)
    at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:73)
    at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.execute(SensorsExecutor.java:63)
    at org.sonarsource.sonarlint.core.analyzer.sensor.PhaseExecutor.execute(PhaseExecutor.java:44)
    at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:143)
    at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:125)
    at org.sonarsource.sonarlint.core.container.ComponentContainer.execute(ComponentContainer.java:110)
    at org.sonarsource.sonarlint.core.container.storage.StorageGlobalContainer.analyze(StorageGlobalContainer.java:135)
    at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.analyze(ConnectedSonarLintEngineImpl.java:156)
    at org.sonarlint.intellij.core.ConnectedSonarLintFacade.startAnalysis(ConnectedSonarLintFacade.java:90)
    at org.sonarlint.intellij.analysis.SonarLintAnalyzer.analyzeModule(SonarLintAnalyzer.java:84)
    at org.sonarlint.intellij.analysis.SonarLintTask.run(SonarLintTask.java:97)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:635)
    at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:170)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:494)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:155)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:128)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:307)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

1 个答案:

答案 0 :(得分:1)

您实际遇到此问题:https://jira.sonarsource.com/browse/SONARJAVA-1831

在声纳分析仪4.2.1版中解决了这个问题,该分析仪即将在撰写时发布。