Gradle sonarRunner和Sonar 3.6.0:org.sonar.api.utils.SonarException:任务null不存在

时间:2013-07-11 12:57:54

标签: gradle sonar-runner

我更新了我们的声纳,如Upgrade Guide中所述。在这样做之后,我试图调用我们通常为声纳提供的Jenkins构建。我们使用gradle 1.6(Wrapper)和buildin sonarRunner。

执行完所有测试后,sonarRunner会产生以下错误:

14:50:27.684 [QUIET] [system.out] 14:50:27.682 INFO  - Load batch settings
14:50:27.763 [QUIET] [system.out] 14:50:27.763 INFO  - User cache: /***/***/.sonar/cache
14:50:27.766 [QUIET] [system.out] 14:50:27.766 INFO  - Install plugins
14:50:28.017 [QUIET] [system.out] 14:50:28.017 INFO  - Install JDBC driver
14:50:28.045 [QUIET] [system.out] 14:50:28.045 INFO  - Create JDBC datasource for jdbc:mysql://***/sonar?useUnicode=true&characterEncoding=utf8
14:50:29.947 [QUIET] [system.out] 14:50:29.947 INFO  - Initializing Hibernate    
14:50:33.249 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on task artifact state cache (/***/***/.gradle/1.6/taskArtifacts).
14:50:33.250 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
14:50:33.250 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':sonarRunner'
14:50:33.250 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :sonarRunner FAILED
14:50:33.254 [ERROR] [org.gradle.BuildExceptionReporter]
14:50:33.255 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
14:50:33.255 [ERROR] [org.gradle.BuildExceptionReporter]
14:50:33.255 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
14:50:33.255 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':sonarRunner'.
14:50:33.255 [ERROR] [org.gradle.BuildExceptionReporter] > org.sonar.api.utils.SonarException: Task null does not exist

在升级之前,这有效。还有其他人遇到过这个问题吗?

1 个答案:

答案 0 :(得分:0)

咩。卸载旧的声纳Web应用程序并加载新版本无法正常工作。

我重新启动了tomcat,问题就消失了。

您是否尝试过将其关闭再打开?