在执行我的Jenkins管道时出现以下错误。有什么想法吗?
下面是我的管道声纳分析部分的阶段(常规):
stage('quality-analysis'){
withSonarQubeEnv('sonar-config-in-jenkins') {
sh "/opt/maven/bin/mvn -f pom.xml sonar:sonar " +
"-Dsonar.login='admin' " +
"-Dsonar.password='PWD' " +
"-Dsonar.language=java "
}
}
[错误]无法执行目标 org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (test上的(default-cli)声纳:目标的执行default-cli org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar 失败:执行时缺少必需的类 org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar: org / sonar / java / model / declaration / MethodTreeImpl
[错误] -------------------------------------------- ---------
[ERROR]域=
plugin> org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603[错误]策略= org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[错误]网址[0] = 文件:/var/lib/jenkins/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.3.0.603/sonar-maven-plugin-3.3.0.603.jar
[错误]网址[1] = 文件:/var/lib/jenkins/.m2/repository/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.jar
[错误]网址[2] = 文件:/var/lib/jenkins/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR]网址[3] = 文件:/var/lib/jenkins/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
[错误]网址[4] = 文件:/var/lib/jenkins/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[错误]网址[5] = 文件:/var/lib/jenkins/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[错误]网址[6] = 文件:/var/lib/jenkins/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
[错误]网址[7] = 文件:/var/lib/jenkins/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.9.0.887/sonar-scanner-api-2.9.0.887.jar
[错误]网址[8] = 文件:/var/lib/jenkins/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[错误]网址[9] = 文件:/var/lib/jenkins/.m2/repository/com/google/code/findbugs/jsr305/2.0.3/jsr305-2.0.3.jar
[ERROR]国外进口数量:1
[错误]导入:条目[从领域ClassRealm [maven.api,父级导入: null]]
[错误]
[错误] -------------------------------------------- ---------
[错误]:org.sonar.java.model.declaration.MethodTreeImpl
[错误]-> [帮助1]
[错误]
[ERROR]要查看错误的完整堆栈跟踪,请使用 -e开关。
[错误]使用-X开关重新运行Maven以启用完整的调试日志记录。
[错误]
[ERROR]有关错误和可能的解决方案的详细信息, 请阅读以下文章:
[错误] [帮助1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException 脚本返回了退出代码1
答案 0 :(得分:0)
我遇到了问题。您不得在创建自定义规则的过程中使用MethodTreeImpl类。 您不得在org.sonar.java.model中使用每个类