gpt4 book ai didi

gradle - Sonar SonarQube - SonarWay Findbugs - sonarRunner 任务期间缺少类消息

转载 作者:行者123 更新时间:2023-12-01 21:57:39 26 4
gpt4 key购买 nike

环境:Java/Linux/Gradle 1.6/Jenkins 最新

gradle clean build jacocoTestReport sonarRunner - 工作正常。

在 sonarRunner 任务期间,当 sonarRunner 尝试将数据发布到 Sonar 自己的数据库(org.h2.jdbc..)时,我看到以下缺失的类/行

我在输出中看到以下几行。我该怎么做才能使这些缺失的项目最终不会在 sonarRunner 任务/步骤中显示。

11:15:47 11:15:47.076 INFO  - Findbugs output report: /production/jenkinsAKS/jobs/CAPersonSvc/workspace/build/sonar/findbugs-result.xml
11:15:55 The following classes needed for analysis were missing:
11:15:55 org.springframework.context.ApplicationContext
11:15:55 org.springframework.context.support.ClassPathXmlApplicationContext
11:15:55 javax.crypto.SecretKey
11:15:55 javax.crypto.spec.PBEKeySpec
11:15:55 javax.crypto.SecretKeyFactory
11:15:55 javax.crypto.spec.PBEParameterSpec
11:15:55 javax.crypto.Cipher
11:15:55 javax.crypto.KeyGenerator
11:15:55 javax.crypto.spec.IvParameterSpec
11:15:55 javax.crypto.spec.SecretKeySpec
11:15:55 11:15:55.245 INFO - Execute Findbugs 2.0.1 done: 10991 ms
11:15:55 11:15:55.247 INFO - Sensor FindbugsSensor done: 10994 ms

谢谢

最佳答案

缺少的类是第三方 jar 的一部分。

请找到jar文件名from here ,然后在本地计算机中搜索 jar 文件的位置。

更改 build.gradle 中的 jar 文件位置。

sonarRunner {
sonarProperties {
properties["sonar.libraries"] += "../Lib/for_spring.jar,../Lib/for_javax.jar"
}
}

您可以通过this for reference :第36.5章

如果您错过任何运行时依赖项来添加,您将收到这样的警告

19:57:21.394 WARN  - Class 'org/apache/commons/chain/Command' is not accessible through the ClassLoader.

正如您所说,您没有收到此警告,因此可能这些不是运行时依赖项。我不确定这些依赖项是什么,但你可以尝试这个。

关于gradle - Sonar SonarQube - SonarWay Findbugs - sonarRunner 任务期间缺少类消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18640546/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com