我们在詹金斯有一个建立工作,我们在这个工作中集成了声纳。但是在我们将源代码从svn迁移到git后,构建失败了。错误如下:
[ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar Embedded error: Unable to retrieve changelog: svn: E155007: '*' is not a working copy [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:103) at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79) at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more Caused by: org.sonar.api.utils.SonarException: Unable to retrieve changelog: svn: E155007: '*' is not a working copy at org.sonar.plugins.scmactivity.Changelog.retrieveChangeSets(Changelog.java:105) at org.sonar.plugins.scmactivity.Changelog.load(Changelog.java:55) at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:83) at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64) at org.sonar.batch.phases.Phases.execute(Phases.java:93) at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143) 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.analyze(BatchModule.java:110) 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.java: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.maven.SonarMojo.execute(SonarMojo.java:151) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98) ... 21 more
我试图消灭工作区,而且我也尝试禁用声纳插件,然后启用它作为互联网上提到的一些解决方案,但问题仍然存在。
我真的很困惑。有人有一些好主意吗?
答案 0 :(得分:0)
我们已经通过升级Sonar中的SCM Activity插件(从1.3版升级到1.6版)来修复它。正如SonarQube Plugins的问题跟踪器所说,这个问题已在SCM Activity 1.4中得到修复。
详细信息:http://jira.codehaus.org/browse/SONARPLUGINS/fixforversion/17309
关于Sonar的SCM活动插件:http://docs.codehaus.org/display/SONAR/SCM+Activity+Plugin
之前我找到了解决方案,但我只是不明白它正在升级Sonar的插件而不是Jenkins的插件然后这个问题让我陷入困境。