不支持的sonar-maven-plugin版本

时间:2015-08-18 14:58:58

标签: java maven jenkins sonarqube version

我的jenkins工作在声纳步骤失败了这个错误:

`core/target/sonar/pmd.xml
[INFO] [10:55:03.908] PMD configuration: /cip/home/jenkins-V1/workspace/SE_CDS_DOUANE-Gamma-BatchArchivage_SONAR/fr-dgddi-gamma-batchArchivage-core/target/sonar/pmd-unit-tests.xml
[INFO] [10:55:03.910] Execute PMD 4.3 done: 5037 ms
[ERROR] java.lang.UnsupportedOperationException: Not supported since v4.2. See http://docs.codehaus.org/display/SONAR/API+Changes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Batch Gamma Archivage ............................. FAILURE [21.158s]
[INFO] Batch Gamma Archivage - Module Jaxb ............... SKIPPED
[INFO] Batch Gamma Archivage - Module Core ............... SKIPPED
[INFO] Batch Archivage ................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.136s
[INFO] Finished at: Tue Aug 18 10:55:03 UTC 2015
[INFO] Final Memory: 57M/311M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.3:sonar (default-cli) on project fr-dgddi-gamma-batchArchivage: java.lang.UnsupportedOperationException: Not supported since v4.2. See http://docs.codehaus.org/display/SONAR/API+Changes -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.3:sonar (default-cli) on project fr-dgddi-gamma-batchArchivage: java.lang.UnsupportedOperationException: Not supported since v4.2. See http://docs.codehaus.org/display/SONAR/API+Changes
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
        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.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:318)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: org.apache.maven.plugin.MojoExecutionException: java.lang.UnsupportedOperationException: Not supported since v4.2. See http://docs.codehaus.org/display/SONAR/API+Changes
        at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:37)
        at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:136)
        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:194)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: org.sonar.api.utils.XmlParserException: java.lang.UnsupportedOperationException: Not supported since v4.2. See http://docs.codehaus.org/display/SONAR/API+Changes
        at org.sonar.plugins.pmd.PmdSensor.analyse(PmdSensor.java:55)
        at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:79)
        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70)
        at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:119)
        at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:194)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
        at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
        at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:233)
        at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
        at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226)
        at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:221)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
        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:125)
        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:173)
        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:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
        at org.sonar.runner.impl.BatchLauncher$1.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.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
        at org.sonar.runner.api.Runner.execute(Runner.java:100)
        at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:132)
        ... 22 more
Caused by: java.lang.UnsupportedOperationException: Not supported since v4.2. See http://docs.codehaus.org/display/SONAR/API+Changes
        at org.sonar.api.resources.JavaFile.unsupported(JavaFile.java:118)
        at org.sonar.api.resources.JavaFile.fromAbsolutePath(JavaFile.java:114)
        at org.sonar.plugins.pmd.PmdViolationToRuleViolation.findResourceFor(PmdViolationToRuleViolation.java:66)
        at org.sonar.plugins.pmd.PmdViolationToRuleViolation.toViolation(PmdViolationToRuleViolation.java:47)
        at org.sonar.plugins.pmd.PmdSensor.reportViolations(PmdSensor.java:63)
        at org.sonar.plugins.pmd.PmdSensor.analyse(PmdSensor.java:53)
        ... 55 more

运行作业3.1的maven版本 JDK 1.7的版本 SonarQube的版本:4.5.1

我使用这些版本的pmd,findbug,checkstyle和java插件:

  • 声纳-PMD-插件-3.3.2.jar
  • 声纳的CheckStyle-插件-3.3.2.jar
  • 声纳的FindBugs-插件-3.3.2.jar
  • 声纳-java的插件-2.9.1.jar

我也试过过sonar-maven-plugin:2.6但仍然是同样的问题。

有没有人知道问题的根源?

祝你好运

0 个答案:

没有答案