2015-11-19 3 views
2

После обновления Sonar с 5.1 до 5.2 Jenkins-Build не удалось. My Jenkins Sonar-Plugin - версия 2.3 и Maven-Plugin 2.6 (я тоже пробовал 2.7.1, но это тоже не получилось). Я использую Maven 3.0.4 и Jenkins 1.629. Вот моя ошибка:Jenkins Build failed - Sonar Maven

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project module.fakturierung: org.sonar.api.resources.Project.getPom()Lorg/apache/maven/project/MavenProject; -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project module.fakturierung: org.sonar.api.resources.Project.getPom()Lorg/apache/maven/project/MavenProject; 
    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.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:320) 
    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(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:606) 
    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:409) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) 
Caused by: org.apache.maven.plugin.MojoExecutionException: org.sonar.api.resources.Project.getPom()Lorg/apache/maven/project/MavenProject; 
    at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:41) 
    at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:139) 
    at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:132) 
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) 
    ... 19 more 
Caused by: java.lang.NoSuchMethodError: org.sonar.api.resources.Project.getPom()Lorg/apache/maven/project/MavenProject; 
    at org.sonar.plugins.findbugs.FindbugsMavenInitializer.getExcludesFiltersFromPluginConfiguration(FindbugsMavenInitializer.java:57) 
    at org.sonar.plugins.findbugs.FindbugsMavenInitializer.execute(FindbugsMavenInitializer.java:52) 
    at org.sonar.batch.phases.InitializersExecutor.execute(InitializersExecutor.java:59) 
    at org.sonar.batch.phases.PhaseExecutor.executeInitializersPhase(PhaseExecutor.java:156) 
    at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:87) 
    at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192) 
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:100) 
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:85) 
    at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:258) 
    at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:253) 
    at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:251) 
    at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:243) 
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:100) 
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:85) 
    at org.sonar.batch.bootstrap.GlobalContainer.executeAnalysis(GlobalContainer.java:153) 
    at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:110) 
    at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:76) 
    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:606) 
    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:135) 
    ... 22 more 
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command 
[ERROR] mvn <goals> -rf :module.fakturierung 

Кто-нибудь идею или решение?

+1

Какая версия Дженкинса? Какую версию Maven вы используете? – khmarbaise

+0

Jenkins - версия 1.629 и Maven 3.0.4 –

+1

Какова версия сонар-поиска, которую вы используете? Я бы рекомендовал использовать последнюю версию. – benzonico

ответ

2

Из фрагмента журнала:

Caused by: java.lang.NoSuchMethodError: org.sonar.api.resources.Project.getPom()Lorg/apache/maven/project/MavenProject; 
at 
org.sonar.plugins.findbugs.FindbugsMavenInitializer.getExcludesFiltersFromPluginConfiguration(FindbugsMavenInitializer.java:57) 

Я думаю, ваша проблема связана с SonarQube встроенной FindBugs плагина: Вы могли бы оказаться полезными SonarQube embedded Findbugs plugin compatibility.

+0

Это был именно плагин Sonarqube Findbugs. Благодаря! –

+0

Эй, что ты сделал, чтобы это исправить? –

+0

Я просто обновил плагин Findbugs. –