SONARCLIPS 3.5.0 sonar.libraries 的无效值 IllegalStateException:没有与 Eclipse Mars 匹配的文件或目录
SONARCLIPS 3.5.0 Invalid value of sonar.libraries IllegalStateException: No files nor directories matching Eclipse Mars
是否应该针对 SONARCLIPS 3.5 报告新的 "Invalid value of sonar.libraries / IllegalStateException: No files nor directories matching" 缺陷。或者我应该尝试重新打开 SonarQube Eclipse 插件 3.5 中已修复的缺陷 SONARCLIPS-430?
在 Eclipse Mars (4.5.0) 中,当我尝试使用 SonarQube Eclipse Plugin 3.5.0.20150804 分析项目时,它失败并显示错误
Invalid value of sonar.libraries
以及由异常引起的
IllegalStateException: No files nor directories matching [...]
根据 SONARCLIPS-430,SonarQube Eclipse 3.5 修复了这个问题。但是我是 运行 3.5 并且仍然遇到问题。我没有在这个项目中使用 Groovy,SONARCLIPS-430 是由关于 groovy 和 SonarQube Eclipse 的 Whosebug 问题产生的:Sonar Eclipse issue.
本次分析涉及的sonar.libraries是(copied from sonar-project2243985040659442672.properties):
sonar.libraries=C:\tool\Java\jdk1.8.0_51\jre\lib\resources.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\rt.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\jsse.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\jce.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\charsets.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\jfr.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\access-bridge-64.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\cldrdata.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\dnsns.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\jaccess.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\jfxrt.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\localedata.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\nashorn.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\sunec.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\sunjce_provider.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\sunmscapi.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\sunpkcs11.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\zipfs.jar,C:/dev/prodtrunk/someProduct/PhysView/PhysViewApi/target/classes,C:/dev/prodtrunk/someProduct/Configuration/ConfigurationStructure/target/classes,C:/dev/prodtrunk/someProduct/Configuration/ConfigurationStructure/target/test-classes,C:\mvnrepo\junit\junit.12\junit-4.12.jar,C:\mvnrepo\org\hamcrest\hamcrest-core.3\hamcrest-core-1.3.jar,C:\mvnrepo\log4j\log4j.2.17\log4j-1.2.17.jar,C:\mvnrepo\org\osgi\org.osgi.compendium.0.0\org.osgi.compendium-5.0.0.jar,C:\mvnrepo\org\osgi\org.osgi.core.0.0\org.osgi.core-5.0.0.jar,C:/dev/prodtrunk/someProduct/DeviceStructure/target/classes,C:/dev/prodtrunk/someProduct/DeviceStructure/target/test-classes,C:\mvnrepo\org\slf4j\slf4j-api.6.6\slf4j-api-1.6.6.jar,C:/dev/prodtrunk/JavaCommon/target/classes,C:/dev/prodtrunk/JavaCommon/target/test-classes,C:\mvnrepo\jython\jython.1\jython-2.1.jar,C:\mvnrepo\commons-codec\commons-codec.7\commons-codec-1.7.jar,C:\mvnrepo\commons-logging\commons-logging.1.1\commons-logging-1.1.1.jar,C:\mvnrepo\commons-cli\commons-cli.0\commons-cli-1.0.jar,C:/dev/prodtrunk/someProduct/Logging/Logging/target/classes,C:\mvnrepo\commons-lang\commons-lang.5\commons-lang-2.5.jar,C:\mvnrepo\commons-collections\commons-collections.2.1\commons-collections-3.2.1.jar,C:\mvnrepo\org\easymock\easymock.3.1\easymock-3.3.1.jar,C:\mvnrepo\cglib\cglib.1\cglib-3.1.jar,C:\mvnrepo\org\ow2\asm\asm.0.3\asm-5.0.3.jar,C:\mvnrepo\org\objenesis\objenesis.1\objenesis-2.1.jar,C:/dev/prodtrunk/someProduct/someProductCommon/target/classes,C:\mvnrepo\org\knopflerfish\bundle\desktop.0.1\desktop-5.0.1.jar,C:\mvnrepo\com\somecompany\someproduct\ActionProcessing.0.0.0-SNAPSHOT\ActionProcessing-7.0.0.0-SNAPSHOT.jar,C:/dev/prodtrunk/someProduct/CircuitManagement/CircuitStructure/target/classes,C:/dev/prodtrunk/someProduct/CircuitManagement/CircuitStructure/target/test-classes,C:/dev/prodtrunk/someProduct/JavaCommon_Bundle/target/classes,C:\mvnrepo\org\hibernate\hibernate-envers.6.4.Final\hibernate-envers-3.6.4.Final.jar,C:\mvnrepo\org\hibernate\hibernate-core.6.4.Final\hibernate-core-3.6.4.Final.jar,C:\mvnrepo\antlr\antlr.7.6\antlr-2.7.6.jar,C:\mvnrepo\dom4j\dom4j.6.1\dom4j-1.6.1.jar,C:\mvnrepo\javax\transaction\jta.1\jta-1.1.jar,C:\mvnrepo\org\hibernate\hibernate-commons-annotations.2.0.Final\hibernate-commons-annotations-3.2.0.Final.jar,C:\mvnrepo\org\hibernate\hibernate-entitymanager.6.4.Final\hibernate-entitymanager-3.6.4.Final.jar,C:\mvnrepo\cglib\cglib.2\cglib-2.2.jar,C:\mvnrepo\asm\asm.1\asm-3.1.jar,C:\mvnrepo\javassist\javassist.12.0.GA\javassist-3.12.0.GA.jar,C:\mvnrepo\org\hibernate\hibernate-tools.2.0.ga\hibernate-tools-3.2.0.ga.jar,C:\mvnrepo\org\beanshell\bsh.0b4\bsh-2.0b4.jar,C:\mvnrepo\freemarker\freemarker.3.8\freemarker-2.3.8.jar,C:\mvnrepo\org\hibernate\jtidy\r8-20060801\jtidy-r8-20060801.jar,C:\mvnrepo\org\hibernate\javax\persistence\hibernate-jpa-2.0-api.0.0.Final\hibernate-jpa-2.0-api-1.0.0.Final.jar,C:/dev/prodtrunk/someProduct/DatabaseCommon/target/classes,C:/dev/prodtrunk/someProduct/LegacyCommunicationsApi/target/classes,C:/dev/prodtrunk/someProduct/Automation/automation-common/target/classes,C:/dev/prodtrunk/someProduct/DSLink_bundle/target/classes,C:\mvnrepo\org\iot-dsa\dslink[=14=].8.0\dslink-0.8.0.jar,C:\mvnrepo\org\iot-dsa\logging[=14=].8.0\logging-0.8.0.jar,C:\mvnrepo\org\iot-dsa\runtime_shared[=14=].8.0\runtime_shared-0.8.0.jar,C:\mvnrepo\io\vertx\vertx-core.1.5\vertx-core-2.1.5.jar,C:\mvnrepo\com\fasterxml\jackson\core\jackson-databind.2.2\jackson-databind-2.2.2.jar,C:\mvnrepo\com\fasterxml\jackson\core\jackson-annotations.2.2\jackson-annotations-2.2.2.jar,C:\mvnrepo\com\fasterxml\jackson\core\jackson-core.2.2\jackson-core-2.2.2.jar,C:\mvnrepo\io\netty\netty-all.0.21.Final\netty-all-4.0.21.Final.jar,C:\mvnrepo\com\beust\jcommander.48\jcommander-1.48.jar,C:\mvnrepo\org\bouncycastle\bcprov-jdk15on.51\bcprov-jdk15on-1.51.jar,C:/dev/prodtrunk/someProduct/someProductSystem/someProductSystemApi/target/classes,C:/dev/prodtrunk/PersistenceService/PersistenceService/target/classes,C:/dev/prodtrunk/PersistenceService/PersistenceService/target/test-classes,C:/dev/prodtrunk/ServiceManagement/ServiceManagement/target/classes,C:/dev/prodtrunk/SecretStuff/SecretStuff/target/classes,C:/dev/prodtrunk/SecretStuff/SecretStuff/target/test-classes,C:\mvnrepo\com\somecompany\someproduct\communication\Communication.0.0.0-SNAPSHOT\Communication-7.0.0.0-SNAPSHOT.jar,C:\mvnrepo\org\jacorb\jacorb.1\jacorb-3.1.jar,C:\mvnrepo\tanukisoft\wrapper.5.4\wrapper-3.5.4.jar,C:\mvnrepo\com\sun\xml\bind\jaxb-impl.1.5\jaxb-impl-2.1.5.jar,C:\mvnrepo\javax\xml\bind\jaxb-api.1\jaxb-api-2.1.jar,C:\mvnrepo\javax\activation\activation.1\activation-1.1.jar,C:\mvnrepo\javax\xml\stream\stax-api.0-2\stax-api-1.0-2.jar,C:\mvnrepo\org\slf4j\slf4j-log4j12.6.6\slf4j-log4j12-1.6.6.jar,C:/dev/prodtrunk/someProduct/Faults/FaultServiceApi/target/classes,C:/dev/prodtrunk/someProduct/Persistence/target/classes,C:\mvnrepo\org\knopflerfish\bundle\remoteserviceadmin-API.0.0\remoteserviceadmin-API-1.0.0.jar,C:\mvnrepo\javax\servlet\servlet-api.4\servlet-api-2.4.jar,C:/dev/prodtrunk/someProduct/Automation/automation-service/target/classes,C:/dev/prodtrunk/someProduct/Automation/automation-service/target/test-classes,C:/dev/prodtrunk/someProduct/Configuration/ConfigurationManagement/target/classes,C:\mvnrepo\org\hibernate\hibernate-c3p0.6.4.Final\hibernate-c3p0-3.6.4.Final.jar,C:\mvnrepo\c3p0\c3p0[=14=].9.1\c3p0-0.9.1.jar,C:/dev/prodtrunk/someProduct/Hibernate/target/classes,C:\mvnrepo\org\postgresql\postgresql.2-1003-jdbc4\postgresql-9.2-1003-jdbc4.jar,C:\mvnrepo\mysql\mysql-connector-java.1.12\mysql-connector-java-5.1.12.jar,C:\mvnrepo\org\codehaus\groovy\groovy-all.0.2\groovy-all-2.0.2.jar,C:/dev/prodtrunk/someProduct/LegacyCommunications/target/classes,C:/dev/prodtrunk/someProduct/LegacyCommunications/target/test-classes,C:/dev/prodtrunk/someProduct/PanelManager/target/classes,C:/dev/prodtrunk/someProduct/PanelManager/target/test-classes,C:\mvnrepo\org\knopflerfish\bundle\console.0.1\console-4.0.1.jar,C:\mvnrepo\org\knopflerfish\log-API.0.0\log-API-5.0.0.jar,C:/dev/prodtrunk/someProduct/Users/UserServiceApi/target/classes,C:/dev/prodtrunk/someProduct/TerminalArbitration/terminalarbitration-common/target/classes,C:/dev/prodtrunk/someProduct/SecretStuffService/target/classes,C:\mvnrepo\com\eclipsesource\jaxrs\publisher.0\publisher-5.0.jar,C:\mvnrepo\com\eclipsesource\jaxrs\jersey-all.18\jersey-all-2.18.jar
发出的完整异常是
08:57:06.276 ERROR - Invalid value of sonar.libraries for com.somecompany.someproduct.physview:PhysViewImpl
Exception in thread "main" org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher.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: java.lang.IllegalStateException: No files nor directories matching 'C:/dev/prodtrunk/someProduct/Configuration/ConfigurationStructure/target/test-classes' in directory C:\dev\prodtrunk\someProduct\PhysView\PhysViewImpl
at org.sonar.batch.scan.ProjectReactorBuilder.validateDirectories(ProjectReactorBuilder.java:302)
at org.sonar.batch.scan.ProjectReactorBuilder.defineProject(ProjectReactorBuilder.java:131)
at org.sonar.batch.scan.ProjectReactorBuilder.execute(ProjectReactorBuilder.java:114)
at org.sonar.batch.scan.ProjectScanContainer.projectBootstrap(ProjectScanContainer.java:114)
at org.sonar.batch.scan.ProjectScanContainer.doBeforeStart(ProjectScanContainer.java:92)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:90)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:110)
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:185)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.sonar.runner.impl.BatchLauncher.delegateExecution(BatchLauncher.java:87)
... 6 more
Julien 的评论引出了答案。出于某种原因,我们有一个空 src/test/java 的 Maven 项目。有一次,我删除了 src/test 和 src/java,错误消失了。
是否应该针对 SONARCLIPS 3.5 报告新的 "Invalid value of sonar.libraries / IllegalStateException: No files nor directories matching" 缺陷。或者我应该尝试重新打开 SonarQube Eclipse 插件 3.5 中已修复的缺陷 SONARCLIPS-430?
在 Eclipse Mars (4.5.0) 中,当我尝试使用 SonarQube Eclipse Plugin 3.5.0.20150804 分析项目时,它失败并显示错误
Invalid value of sonar.libraries
以及由异常引起的
IllegalStateException: No files nor directories matching [...]
根据 SONARCLIPS-430,SonarQube Eclipse 3.5 修复了这个问题。但是我是 运行 3.5 并且仍然遇到问题。我没有在这个项目中使用 Groovy,SONARCLIPS-430 是由关于 groovy 和 SonarQube Eclipse 的 Whosebug 问题产生的:Sonar Eclipse issue.
本次分析涉及的sonar.libraries是(copied from sonar-project2243985040659442672.properties):
sonar.libraries=C:\tool\Java\jdk1.8.0_51\jre\lib\resources.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\rt.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\jsse.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\jce.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\charsets.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\jfr.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\access-bridge-64.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\cldrdata.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\dnsns.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\jaccess.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\jfxrt.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\localedata.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\nashorn.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\sunec.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\sunjce_provider.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\sunmscapi.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\sunpkcs11.jar,C:\tool\Java\jdk1.8.0_51\jre\lib\ext\zipfs.jar,C:/dev/prodtrunk/someProduct/PhysView/PhysViewApi/target/classes,C:/dev/prodtrunk/someProduct/Configuration/ConfigurationStructure/target/classes,C:/dev/prodtrunk/someProduct/Configuration/ConfigurationStructure/target/test-classes,C:\mvnrepo\junit\junit.12\junit-4.12.jar,C:\mvnrepo\org\hamcrest\hamcrest-core.3\hamcrest-core-1.3.jar,C:\mvnrepo\log4j\log4j.2.17\log4j-1.2.17.jar,C:\mvnrepo\org\osgi\org.osgi.compendium.0.0\org.osgi.compendium-5.0.0.jar,C:\mvnrepo\org\osgi\org.osgi.core.0.0\org.osgi.core-5.0.0.jar,C:/dev/prodtrunk/someProduct/DeviceStructure/target/classes,C:/dev/prodtrunk/someProduct/DeviceStructure/target/test-classes,C:\mvnrepo\org\slf4j\slf4j-api.6.6\slf4j-api-1.6.6.jar,C:/dev/prodtrunk/JavaCommon/target/classes,C:/dev/prodtrunk/JavaCommon/target/test-classes,C:\mvnrepo\jython\jython.1\jython-2.1.jar,C:\mvnrepo\commons-codec\commons-codec.7\commons-codec-1.7.jar,C:\mvnrepo\commons-logging\commons-logging.1.1\commons-logging-1.1.1.jar,C:\mvnrepo\commons-cli\commons-cli.0\commons-cli-1.0.jar,C:/dev/prodtrunk/someProduct/Logging/Logging/target/classes,C:\mvnrepo\commons-lang\commons-lang.5\commons-lang-2.5.jar,C:\mvnrepo\commons-collections\commons-collections.2.1\commons-collections-3.2.1.jar,C:\mvnrepo\org\easymock\easymock.3.1\easymock-3.3.1.jar,C:\mvnrepo\cglib\cglib.1\cglib-3.1.jar,C:\mvnrepo\org\ow2\asm\asm.0.3\asm-5.0.3.jar,C:\mvnrepo\org\objenesis\objenesis.1\objenesis-2.1.jar,C:/dev/prodtrunk/someProduct/someProductCommon/target/classes,C:\mvnrepo\org\knopflerfish\bundle\desktop.0.1\desktop-5.0.1.jar,C:\mvnrepo\com\somecompany\someproduct\ActionProcessing.0.0.0-SNAPSHOT\ActionProcessing-7.0.0.0-SNAPSHOT.jar,C:/dev/prodtrunk/someProduct/CircuitManagement/CircuitStructure/target/classes,C:/dev/prodtrunk/someProduct/CircuitManagement/CircuitStructure/target/test-classes,C:/dev/prodtrunk/someProduct/JavaCommon_Bundle/target/classes,C:\mvnrepo\org\hibernate\hibernate-envers.6.4.Final\hibernate-envers-3.6.4.Final.jar,C:\mvnrepo\org\hibernate\hibernate-core.6.4.Final\hibernate-core-3.6.4.Final.jar,C:\mvnrepo\antlr\antlr.7.6\antlr-2.7.6.jar,C:\mvnrepo\dom4j\dom4j.6.1\dom4j-1.6.1.jar,C:\mvnrepo\javax\transaction\jta.1\jta-1.1.jar,C:\mvnrepo\org\hibernate\hibernate-commons-annotations.2.0.Final\hibernate-commons-annotations-3.2.0.Final.jar,C:\mvnrepo\org\hibernate\hibernate-entitymanager.6.4.Final\hibernate-entitymanager-3.6.4.Final.jar,C:\mvnrepo\cglib\cglib.2\cglib-2.2.jar,C:\mvnrepo\asm\asm.1\asm-3.1.jar,C:\mvnrepo\javassist\javassist.12.0.GA\javassist-3.12.0.GA.jar,C:\mvnrepo\org\hibernate\hibernate-tools.2.0.ga\hibernate-tools-3.2.0.ga.jar,C:\mvnrepo\org\beanshell\bsh.0b4\bsh-2.0b4.jar,C:\mvnrepo\freemarker\freemarker.3.8\freemarker-2.3.8.jar,C:\mvnrepo\org\hibernate\jtidy\r8-20060801\jtidy-r8-20060801.jar,C:\mvnrepo\org\hibernate\javax\persistence\hibernate-jpa-2.0-api.0.0.Final\hibernate-jpa-2.0-api-1.0.0.Final.jar,C:/dev/prodtrunk/someProduct/DatabaseCommon/target/classes,C:/dev/prodtrunk/someProduct/LegacyCommunicationsApi/target/classes,C:/dev/prodtrunk/someProduct/Automation/automation-common/target/classes,C:/dev/prodtrunk/someProduct/DSLink_bundle/target/classes,C:\mvnrepo\org\iot-dsa\dslink[=14=].8.0\dslink-0.8.0.jar,C:\mvnrepo\org\iot-dsa\logging[=14=].8.0\logging-0.8.0.jar,C:\mvnrepo\org\iot-dsa\runtime_shared[=14=].8.0\runtime_shared-0.8.0.jar,C:\mvnrepo\io\vertx\vertx-core.1.5\vertx-core-2.1.5.jar,C:\mvnrepo\com\fasterxml\jackson\core\jackson-databind.2.2\jackson-databind-2.2.2.jar,C:\mvnrepo\com\fasterxml\jackson\core\jackson-annotations.2.2\jackson-annotations-2.2.2.jar,C:\mvnrepo\com\fasterxml\jackson\core\jackson-core.2.2\jackson-core-2.2.2.jar,C:\mvnrepo\io\netty\netty-all.0.21.Final\netty-all-4.0.21.Final.jar,C:\mvnrepo\com\beust\jcommander.48\jcommander-1.48.jar,C:\mvnrepo\org\bouncycastle\bcprov-jdk15on.51\bcprov-jdk15on-1.51.jar,C:/dev/prodtrunk/someProduct/someProductSystem/someProductSystemApi/target/classes,C:/dev/prodtrunk/PersistenceService/PersistenceService/target/classes,C:/dev/prodtrunk/PersistenceService/PersistenceService/target/test-classes,C:/dev/prodtrunk/ServiceManagement/ServiceManagement/target/classes,C:/dev/prodtrunk/SecretStuff/SecretStuff/target/classes,C:/dev/prodtrunk/SecretStuff/SecretStuff/target/test-classes,C:\mvnrepo\com\somecompany\someproduct\communication\Communication.0.0.0-SNAPSHOT\Communication-7.0.0.0-SNAPSHOT.jar,C:\mvnrepo\org\jacorb\jacorb.1\jacorb-3.1.jar,C:\mvnrepo\tanukisoft\wrapper.5.4\wrapper-3.5.4.jar,C:\mvnrepo\com\sun\xml\bind\jaxb-impl.1.5\jaxb-impl-2.1.5.jar,C:\mvnrepo\javax\xml\bind\jaxb-api.1\jaxb-api-2.1.jar,C:\mvnrepo\javax\activation\activation.1\activation-1.1.jar,C:\mvnrepo\javax\xml\stream\stax-api.0-2\stax-api-1.0-2.jar,C:\mvnrepo\org\slf4j\slf4j-log4j12.6.6\slf4j-log4j12-1.6.6.jar,C:/dev/prodtrunk/someProduct/Faults/FaultServiceApi/target/classes,C:/dev/prodtrunk/someProduct/Persistence/target/classes,C:\mvnrepo\org\knopflerfish\bundle\remoteserviceadmin-API.0.0\remoteserviceadmin-API-1.0.0.jar,C:\mvnrepo\javax\servlet\servlet-api.4\servlet-api-2.4.jar,C:/dev/prodtrunk/someProduct/Automation/automation-service/target/classes,C:/dev/prodtrunk/someProduct/Automation/automation-service/target/test-classes,C:/dev/prodtrunk/someProduct/Configuration/ConfigurationManagement/target/classes,C:\mvnrepo\org\hibernate\hibernate-c3p0.6.4.Final\hibernate-c3p0-3.6.4.Final.jar,C:\mvnrepo\c3p0\c3p0[=14=].9.1\c3p0-0.9.1.jar,C:/dev/prodtrunk/someProduct/Hibernate/target/classes,C:\mvnrepo\org\postgresql\postgresql.2-1003-jdbc4\postgresql-9.2-1003-jdbc4.jar,C:\mvnrepo\mysql\mysql-connector-java.1.12\mysql-connector-java-5.1.12.jar,C:\mvnrepo\org\codehaus\groovy\groovy-all.0.2\groovy-all-2.0.2.jar,C:/dev/prodtrunk/someProduct/LegacyCommunications/target/classes,C:/dev/prodtrunk/someProduct/LegacyCommunications/target/test-classes,C:/dev/prodtrunk/someProduct/PanelManager/target/classes,C:/dev/prodtrunk/someProduct/PanelManager/target/test-classes,C:\mvnrepo\org\knopflerfish\bundle\console.0.1\console-4.0.1.jar,C:\mvnrepo\org\knopflerfish\log-API.0.0\log-API-5.0.0.jar,C:/dev/prodtrunk/someProduct/Users/UserServiceApi/target/classes,C:/dev/prodtrunk/someProduct/TerminalArbitration/terminalarbitration-common/target/classes,C:/dev/prodtrunk/someProduct/SecretStuffService/target/classes,C:\mvnrepo\com\eclipsesource\jaxrs\publisher.0\publisher-5.0.jar,C:\mvnrepo\com\eclipsesource\jaxrs\jersey-all.18\jersey-all-2.18.jar
发出的完整异常是
08:57:06.276 ERROR - Invalid value of sonar.libraries for com.somecompany.someproduct.physview:PhysViewImpl
Exception in thread "main" org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher.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: java.lang.IllegalStateException: No files nor directories matching 'C:/dev/prodtrunk/someProduct/Configuration/ConfigurationStructure/target/test-classes' in directory C:\dev\prodtrunk\someProduct\PhysView\PhysViewImpl
at org.sonar.batch.scan.ProjectReactorBuilder.validateDirectories(ProjectReactorBuilder.java:302)
at org.sonar.batch.scan.ProjectReactorBuilder.defineProject(ProjectReactorBuilder.java:131)
at org.sonar.batch.scan.ProjectReactorBuilder.execute(ProjectReactorBuilder.java:114)
at org.sonar.batch.scan.ProjectScanContainer.projectBootstrap(ProjectScanContainer.java:114)
at org.sonar.batch.scan.ProjectScanContainer.doBeforeStart(ProjectScanContainer.java:92)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:90)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:110)
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:185)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.sonar.runner.impl.BatchLauncher.delegateExecution(BatchLauncher.java:87)
... 6 more
Julien 的评论引出了答案。出于某种原因,我们有一个空 src/test/java 的 Maven 项目。有一次,我删除了 src/test 和 src/java,错误消失了。