SonarQube分析期间“未找到类”

时间:2015-09-02 13:57:59

标签: jenkins sonarqube sonarqube5.1.2

我在Jenkins工作中的sonarqube分析中有很多错误,分析成功

[ERROR] [14:36:44.124] Class not found: org.joda.convert.FromString
[ERROR] [14:36:44.126] Class not found: org.joda.convert.ToString
[ERROR] [14:34:42.441] Class not found: org.apache.commons.logging.Log
[ERROR] [14:34:42.724] Class not found: org.apache.oro.text.perl.Perl5Util
[ERROR] [14:34:31.442] Class not found: io.swagger.annotations.ApiModel
[ERROR] [14:34:31.442] Class not found: io.swagger.annotations.ApiModelProperty
[ERROR] [14:28:37.756] Class not found: org.apache.commons.logging.Log
[ERROR] [14:28:40.030] Class not found: org.apache.oro.text.perl.Perl5Util

SonareQube:5.1.2

sonarQube jenkins插件:2.6

JDK:1.7

请帮助

感谢

3 个答案:

答案 0 :(得分:5)

将以下依赖项添加到您的pom

<dependency>
    <groupId>org.joda</groupId>
    <artifactId>joda-convert</artifactId>
    <version>1.8.1</version>
    <scope>provided</scope>
</dependency>

答案 1 :(得分:2)

如果找不到上述类的.class文件,则会显示此错误。这可能会导致提出的准确性降低,准确性降低。

您应该检查分析配置,更具体地说是sonar.java.libraries属性,以确保为项目提供正确的依赖关系。

答案 2 :(得分:2)

我们案例中的根本原因是过时的Sonar插件。为了弄清楚是哪一个,你需要运行Maven调试版本,即用-X运行它。在

Class not found: org.joda.convert.FromString
Class not found: org.joda.convert.ToString

你会看到sonar-jmeter-plugin是不是最新的例子。

相关问题