java参数目录不是目录_声纳出错:java.lang.IllegalArgumentException:参数'directory'不是声纳中的目录错误...

我在Tomcat上使用Sonar,并在使用ant的java项目上使用。

当我在命令提示符下运行声纳时,出现以下错误。

java.lang.IllegalArgumentException: Parameter 'directory' is not a directory在以前的项目工作正常,但是当我配置一个新的项目我得到这个错误..

完整的错误

sonar:

[sonar:sonar] Apache Ant version 1.8.1 compiled on April 30 2010

[sonar:sonar] Sonar Ant Task version: 1.0

[sonar:sonar] Loaded from: file:/D:/JavaWorld/ContinuousIntegration/Provider /workspace/WS/sonar-ant-task-1.0.jar

[sonar:sonar] Sonar work directory: D:\JavaWorld\ContinuousIntegration\Provider\workspace\WS\.sonar

[sonar:sonar] Sonar server: http://localhost:8080/sonar/

[sonar:sonar] Sonar version: 2.8

[sonar:sonar] [INFO] Database dialect class org.sonar.jpa.dialect.Derby

[sonar:sonar] [INFO] Initializing Hibernate

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(2) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docum

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(3) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docum

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(4) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docum

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(5) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docum

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(6) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docum

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(7) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docum

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(8) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docum

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(9) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docum

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(10) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(11) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(12) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(13) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(14) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(15) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(16) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(17) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(18) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(19) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(20) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(21) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(22) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(23) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(24) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(25) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(26) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(27) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(28) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(29) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(31) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(34) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [WARN] Warning parsing XML: XML InputStream(39) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the docu

[sonar:sonar] [INFO] Execution environment: Ant Apache Ant version 1.8.1 compiled on April 30 2010

[sonar:sonar] [INFO] ------------- Analyzing MyProject

[sonar:sonar] [INFO] Selected quality profile : [name=MyProj,language=java]

[sonar:sonar] [INFO] Compare over 5 days (2012-03-04)

[sonar:sonar] [INFO] Compare over 30 days (2012-02-08)

[sonar:sonar] [INFO] Configure maven plugins...

[sonar:sonar] [INFO] Sensor AsynchronousMeasuresSensor...

[sonar:sonar] [INFO] Sensor AsynchronousMeasuresSensor done: 1609 ms

[sonar:sonar] [INFO] Sensor JavaSourceImporter...

[sonar:sonar] [INFO] Sensor JavaSourceImporter done: 2547 ms

[sonar:sonar] [INFO] Sensor SquidSensor...

BUILD FAILED

D:\JavaWorld\ContinuousIntegration\Provider\workspace\WS\sonar-build.xml:80: java.lang.IllegalArgumentException: Parameter 'directory' is not a directory

at org.apache.commons.io.FileUtils.listFiles(FileUtils.java:358)

at org.apache.commons.io.FileUtils.listFiles(FileUtils.java:443)

at org.sonar.plugins.squid.SquidSensor.hasProjectBytecodeFiles(SquidSensor.java:109)

at org.sonar.plugins.squid.SquidSensor.getMainBytecodeFiles(SquidSensor.java:95)

at org.sonar.plugins.squid.SquidSensor.analyzeMainSources(SquidSensor.java:78)

at org.sonar.plugins.squid.SquidSensor.analyse(SquidSensor.java:62)

at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:58)

at org.sonar.batch.phases.Phases.execute(Phases.java:80)

at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:59)

at org.sonar.batch.Batch.analyzeModule(Batch.java:164)

at org.sonar.batch.Batch.analyzeModules(Batch.java:82)

at org.sonar.batch.Batch.execute(Batch.java:62)

at org.sonar.ant.Launcher.executeBatch(Launcher.java:121)

at org.sonar.ant.Launcher.execute(Launcher.java:60)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.sonar.ant.SonarTask.delegateExecution(SonarTask.java:167)

at org.sonar.ant.SonarTask.execute(SonarTask.java:151)

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)

at org.apache.tools.ant.Task.perform(Task.java:348)

at org.apache.tools.ant.Target.execute(Target.java:390)

at org.apache.tools.ant.Target.performTasks(Target.java:411)

at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)

at org.apache.tools.ant.Project.executeTarget(Project.java:1366)

at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)

at org.apache.tools.ant.Project.executeTargets(Project.java:1249)

at org.apache.tools.ant.Main.runBuild(Main.java:801)

at org.apache.tools.ant.Main.startAnt(Main.java:218)

at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)

at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)任何人都建议我解决方案?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值