如何解决“缺少以下分析所需的类”

时间:2019-05-23 16:34:11

标签: gradle sonarqube

我尝试在我的Java项目中启动声纳分析,但任务因错误而停止。

以下事实: Gradle包装器4.10 sonarqube-gradle-plugin:2.7.1 Java 8

我已经定义了插件并执行“ gradlew sonarqube”。在那之后,我所有的单元测试都被执行了……但是突然过程停止了,并显示了一条错误消息:

缺少分析所需的以下类:   应用   测试   接受

18:20:37: Executing task 'sonarqube'...

:wrapper

BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed
> Task :compileJava NO-SOURCE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test NO-SOURCE
> Task :frontend:compileJava NO-SOURCE
> Task :frontend:processResources NO-SOURCE
> Task :frontend:classes UP-TO-DATE
> Task :frontend:compileTestJava NO-SOURCE
> Task :frontend:processTestResources NO-SOURCE
> Task :frontend:testClasses UP-TO-DATE
> Task :frontend:test NO-SOURCE
> Task :frontend:jar
> Task :application:compileJava
> Task :application:processResources
> Task :application:classes
> Task :application:compileTestJava
> Task :application:processTestResources NO-SOURCE
> Task :application:testClasses
> Task :application:test
The following classes needed for analysis were missing:
  apply
  test
  accept
> Task :sonarqube

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 25s
6 actionable tasks: 6 executed
18:21:03: Task execution finished 'sonarqube'.


如果尝试将sonarqube-plugin-version降级,但没有帮助。

我该如何解决?

最好的问候

迈克尔

1 个答案:

答案 0 :(得分:1)

这些警告似乎是关于find-sec-bugs项目中Java 8 lamda支持的错误:

似乎尚未修复该错误。