蚂蚁声纳构建错误



我是声纳新手,遇到了这个错误我尝试了所有可能的方法来排序这个错误,但提供的解决方案仍然无法修复。根据它检查了声纳特性,看起来很好

请帮忙。日志如下:

D:KhushbooRepositoryVOICE_BR_CDV_GATEWAY-1406_VoiceGateway-1406appVoiceGateway>ant sonar -Dworkspace=..workspace.xml -Dworkshop.home=D:OracleMiddleware1workshop_10.3 -Dworkshop.lib.dir=..workshop-lib -Dwl.home=D:OracleMiddleware1wlserver_10.3
Buildfile: D:KhushbooRepositoryVOICE_BR_CDV_GATEWAY-1406_VoiceGateway-1406a
ppVoiceGatewaybuild.xml
sonar:
[sonar:sonar] Apache Ant(TM) version 1.9.2 compiled on July 8 2013
[sonar:sonar] Sonar Ant Task version: 2.0
[sonar:sonar] Loaded from: file:/D:/jdevkhus/apache-ant-1.9.2/lib/sonar-ant-task-2.0.jar
[sonar:sonar] Sonar work directory: D:KhushbooRepositoryVOICE_BR_CDV_GATEWAY-
1406_VoiceGateway-1406appVoiceGateway.sonar
[sonar:sonar] Sonar server: http://localhost:9000
[sonar:sonar] 17:03:25.745 INFO  - Load batch settings
[sonar:sonar] 17:03:25.787 INFO  - User cache: C:Users908156.sonarcache
[sonar:sonar] 17:03:25.792 INFO  - Install plugins
[sonar:sonar] 17:03:26.279 INFO  - Install JDBC driver
[sonar:sonar] 17:03:26.285 WARN  - H2 database should be used for evaluation pur
pose only
[sonar:sonar] 17:03:26.286 INFO  - Create JDBC datasource for jdbc:h2:tcp://loca
lhost/sonar
[sonar:sonar] 17:03:26.788 INFO  - Initializing Hibernate
[sonar:sonar] 17:03:30.064 INFO  - Load project settings
[sonar:sonar] 17:03:30.085 INFO  - Apply project exclusions
[sonar:sonar] 17:03:30.142 INFO  - -------------  Scan Simple Java Project analy
zed with the SonarQube Ant Task
[sonar:sonar] 17:03:30.144 INFO  - Load module settings
[sonar:sonar] 17:03:30.435 INFO  - Quality profile : [name=Sonar way,language=ja
va]
[sonar:sonar] 17:03:30.444 INFO  - Excluded tests:
[sonar:sonar] 17:03:30.444 INFO  -   **/package-info.java
[sonar:sonar] 17:03:30.468 INFO  - Configure Maven plugins
[sonar:sonar] 17:03:30.505 INFO  - Compare to previous analysis
[sonar:sonar] 17:03:30.520 INFO  - Compare over 30 days (2014-09-28)
[sonar:sonar] 17:03:30.528 INFO  - Compare to previous version
[sonar:sonar] 17:03:30.573 INFO  - Initializer JacocoAntInitializer...
[sonar:sonar] 17:03:30.596 INFO  - JaCoCo agent (version 0.6.2.201302030002) ext
racted: C:Users908156AppDataLocalTempjacocoagent32395.jar
[sonar:sonar] 17:03:30.597 INFO  - Initializer JacocoAntInitializer done: 24 ms
[sonar:sonar] 17:03:30.597 INFO  - Base dir: D:KhushbooRepositoryVOICE_BR_CDV
_GATEWAY-1406_VoiceGateway-1406appVoiceGateway
    [sonar:sonar] 17:03:30.597 INFO  - Working dir: D:KhushbooRepositoryVOICE_BR_
CDV_GATEWAY-1406_VoiceGateway-1406appVoiceGateway.sonar
[sonar:sonar] 17:03:30.598 INFO  - Source dirs: D:KhushbooRepositoryVOICE_BR_
CDV_GATEWAY-1406_VoiceGateway-1406appVoiceGatewayServiceServiceImplsrc
[sonar:sonar] 17:03:30.598 INFO  - Binary dirs: D:KhushbooJAVAsonar-3.7.3lib
*.jar
[sonar:sonar] 17:03:30.598 INFO  - Source encoding: windows-1252, default locale
: en_US
[sonar:sonar] 17:03:30.789 INFO  - Sensor JavaSourceImporter...
[sonar:sonar] 17:03:31.105 INFO  - Sensor JavaSourceImporter done: 316 ms
[sonar:sonar] 17:03:31.105 INFO  - Sensor JavaSquidSensor...
[sonar:sonar] 17:03:31.163 INFO  - Java AST scan...
BUILD FAILED
D:KhushbooRepositoryVOICE_BR_CDV_GATEWAY-1406_VoiceGateway-1406appVoiceGat
ewaybuild.xml:404: org.sonar.runner.RunnerException: org.sonar.squid.api.Analys
isException: Sonar is unable to analyze file : 'D:KhushbooRepositoryVOICE_BR_
CDV_GATEWAY-1406_VoiceGateway-1406appVoiceGatewayServiceServiceImplsrcmain
javacomcomcastusagecemputilsDebugHandler.java'
    at org.sonar.runner.Runner.delegateExecution(Runner.java:288)
    at org.sonar.runner.Runner.execute(Runner.java:151)
    at org.sonar.ant.SonarTask.launchAnalysis(SonarTask.java:93)
    at org.sonar.ant.SonarTask.execute(SonarTask.java:75)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.Main.runBuild(Main.java:851)
    at org.apache.tools.ant.Main.startAnt(Main.java:235)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: org.sonar.squid.api.AnalysisException: Sonar is unable to analyze fil
e : 'D:KhushbooRepositoryVOICE_BR_CDV_GATEWAY-1406_VoiceGateway-1406appVoi
ceGatewayServiceServiceImplsrcmainjavacomcomcastusagecemputilsDebugHan
dler.java'
    at org.sonar.java.ast.AstScanner.scan(AstScanner.java:132)
    at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:113)
    at org.sonar.java.JavaSquid.scan(JavaSquid.java:107)
    at org.sonar.plugins.java.JavaSquidSensor.analyse(JavaSquidSensor.java:7
9)
    at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:7
2)
    at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:114)
    at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanConta
iner.java:142)
    at org.sonar.api.platform.ComponentContainer.startComponents(ComponentCo
ntainer.java:92)
    at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.
java:77)
    at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.j
ava:187)
    at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScan
Container.java:182)
    at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanCon
tainer.java:175)
    at org.sonar.api.platform.ComponentContainer.startComponents(ComponentCo
ntainer.java:92)
    at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.
java:77)
    at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
    at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
    at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.ja
va:82)
    at org.sonar.api.platform.ComponentContainer.startComponents(ComponentCo
ntainer.java:92)
    at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.
java:77)
    at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapCon
tainer.java:156)
    at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapCo
ntainer.java:144)
    at org.sonar.api.platform.ComponentContainer.startComponents(ComponentCo
ntainer.java:92)
    at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.
java:77)
    at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
    at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
    at org.sonar.batch.Batch.execute(Batch.java:103)
    at org.sonar.runner.internal.batch.Launcher.executeBatch(Launcher.java:6
9)
    at org.sonar.runner.internal.batch.Launcher.execute(Launcher.java:61)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.sonar.runner.Runner.delegateExecution(Runner.java:285)
    ... 20 more
Caused by: org.sonar.squid.api.AnalysisException: The source directory does not
correspond to the package declaration com.comcast.usage.cemp.utils
    at org.sonar.java.ast.visitors.PackageVisitor.checkPhysicalDirectory(Pac
kageVisitor.java:101)
    at org.sonar.java.ast.visitors.PackageVisitor.getPackageKey(PackageVisit
or.java:70)
    at org.sonar.java.ast.visitors.PackageVisitor.visitFile(PackageVisitor.j
ava:39)
    at com.sonar.sslr.impl.ast.AstWalker.walkAndVisit(AstWalker.java:67)
    at org.sonar.java.ast.AstScanner.scan(AstScanner.java:93)
    ... 52 more
Total time: 14 seconds

仔细检查堆栈。第一条消息:

原因:org.sona.quid.api.AnalysisException:sonar无法分析文件:'D:\Khushboo\Repository\VOICE_BR_CDV_GATEWAY-1406_VoiceGateway-1406\app\VoiceGatewayService\ServiceImpl\src\main\java\com\comcast\uusage\cemp\utils\DebugHandler.java'

由第二个解释:

由:org.sona.quid.api.AnalysisException引起:源目录与包声明不一致com.comcast.usage.cemp.utils

所以。。。Sonar的"src"属性是否设置为以下?

  • D: \Khushboo\Repository\VOICE_BR_CDV_GATEWAY-1406_VoiceGateway-1406\app\VoiceGatewayService\ServiceImpl\src\main\java

相关内容

  • 没有找到相关文章

最新更新