English 中文(简体)
Can not Implement Sonar: Fail to decorate
原标题:Can not execute Sonar: Fail to decorate

I installed a sonar server on my own pc (Windows XP), and I deployed sonar on Tomcat with a MySQL database. I successfully analysed an old project. But with my current project, I get this exception when trying to execute mvn sonar:sonar:

EDIT:

[INFO] [14:39:37.254] Sensor CoberturaSensor done: 218 ms
[INFO] [14:39:37.254] Sensor Maven dependencies...
[INFO] [14:39:41.426] Sensor Maven dependencies done: 4172 ms
[INFO] [14:39:41.848] Execute decorators...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:53.354s
[INFO] Finished at: Tue May 15 14:39:43 CEST 2012
[INFO] Final Memory: 21M/138M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (d
efault-cli) on project XXX: Can not execute Sonar: Fail to decorate  com.myPackage
.myClass : 793 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project XXX: Can
not execute Sonar
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:217)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar

        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)

        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
        ... 19 more
Caused by: org.sonar.api.utils.SonarException: Fail to decorate  com.myPackage.myClass
 
        at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(Decorators
Executor.java:84)
        at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(Decorators
Executor.java:70)
        at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(Decorators
Executor.java:63)
        at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(Decorators
Executor.java:63)
        at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.
java:55)
        at org.sonar.batch.phases.Phases.execute(Phases.java:94)
        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:14
3)
        at org.sonar.batch.bootstrap.Module.start(Module.java:83)
        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)
        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)
        at org.sonar.batch.bootstrap.Module.start(Module.java:83)
        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.jav
a:109)
        at org.sonar.batch.bootstrap.Module.start(Module.java:83)
        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)
        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)
        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)

        ... 23 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 793
        at org.sonar.plugins.core.timemachine.tracking.HashedSequenceComparator.
equals(HashedSequenceComparator.java:34)
        at org.sonar.plugins.core.timemachine.ViolationTrackingBlocksRecognizer.
computeLengthOfMaximalBlock(ViolationTrackingBlocksRecognizer.java:48)
        at org.sonar.plugins.core.timemachine.ViolationTrackingDecorator.mapViol
ations(ViolationTrackingDecorator.java:130)
        at org.sonar.plugins.core.timemachine.ViolationTrackingDecorator.decorat
e(ViolationTrackingDecorator.java:70)
        at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(Decorators
Executor.java:79)
        ... 39 more

我不理解问题产生在何处。 谁有答案? 这能否来自我的POM配置?

PS: 指挥线路mvn Cleanstal>mvn Site工作正确......

最佳回答

页: 1 http://www.sonarsource.org/downloads/“http://www.sonarsource.org/downloads/>。 从而解决这个问题。

问题回答

暂无回答




相关问题
Maven plugin for gathering source code statistics [closed]

Our project is based on J2EE and we would like to know if there is a open source maven-plugin which either integrates with cloc (Refer How can I measure source code statistics?) or other tools?

Transitive dependencies in maven plugins

Are dependencies in Maven plugins supposed to resolve their transitive dependencies or do they have to be manually added to the plugin dependencies?

Signing Applet with Maven jar plug-in and Bouncy Castle

I have a problem with a signed Java applet - specifically, why it is not signed using my certificate. I m using Maven in Eclipse. The applet (a) allows the user to choose a local file or directory, (...

Change output directory for apt-maven-plugin

I am using apt-maven-plugin to process some Beehive Netui annotations before building a war. The output of the apt processing is a _pageflow directory which contains struts config files (xml text) ...

Compile scala classes with debug info through Maven

I have a scala project that I use Maven and the maven-scala-plugin to compile. I need to include debug information in the compiled classes and I was wondering is there a way to ask Maven or the scala ...

热门标签