gpt4 book ai didi

gradle - 使用 gradle sonarqube 插件执行错误

转载 作者:行者123 更新时间:2023-12-03 04:37:44 26 4
gpt4 key购买 nike

由于某种原因,SonarQube 执行失败。但我不明白为什么。
该分析以前运行良好,但突然之间每次都会发生此错误(自工作以来唯一发生变化的是正在分析的代码)

服务器:

  • SonarQube 4.5.4(在这种情况下可能无关紧要)
  • PMD 插件 2.3

  • 客户:
  • Gradle 2.x(已尝试 2.2、2.4、2.6)
  • 多模块项目(安卓)
  • org.sonarqube.gradle:gradle-sonarqube-plugin:1.0
  • 客户端操作系统(TeamCity 构建代理):Linux,版本 3.13.0-52-generic

  • 客户端错误日志(部分):
    [16:05:28][Step 3/3] 14:04:06.125 INFO  - Execute PMD 5.2.1 done: 2731 ms
    [16:05:28][Step 3/3] :sonarqube FAILED
    [16:05:28][Step 3/3] :sonarqube (Thread[Daemon worker,5,main]) completed. Took 28.276 secs.
    [16:05:28][Step 3/3]
    [16:05:28][Step 3/3] FAILURE: Build failed with an exception.
    [16:05:28][Step 3/3]
    [16:05:28][Step 3/3] * What went wrong:
    [16:05:28][Step 3/3] Execution failed for task ':sonarqube'.
    [16:05:28][Step 3/3] > Unable to execute Sonar
    [16:05:28][Step 3/3]
    [16:05:28][Step 3/3] * Try:
    [16:05:28][Step 3/3] Run with --debug option to get more log output.
    [16:05:28][Step 3/3]
    [16:05:28][Step 3/3] * Exception is:
    [16:05:28][Step 3/3] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':sonarqube'.
    ...
    [16:05:28][Step 3/3] Caused by: java.lang.ClassNotFoundException: android.app.Service
    [16:05:28][Step 3/3] ... 154 more
    [16:05:28][Step 3/3]
    [16:05:28][Step 3/3] Stopped 0 compiler daemon(s).
    [16:05:29][Step 3/3] Received result DaemonCommandResult[type=CommandFailure, value=org.gradle.launcher.exec.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':sonarqube'.] from daemon DaemonInfo{pid=23443, address=[ec2724a7-72a9-4431-9625-d454f3bd053c port:47788, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]], idle=false, context=DefaultDaemonContext[uid=87652ca6-5d94-436f-b633-630f97c81e4c,javaHome=/usr/lib/jvm/java-8-oracle,daemonRegistryDir=/home/buildagent/.gradle/daemon,pid=23443,idleTimeout=120000,daemonOpts=-XX:MaxPermSize=512m,-Dfile.encoding=US-ASCII,-Duser.country=US,-Duser.language=en,-Duser.variant]}.
    [16:05:29][Step 3/3] Process exited with code 1
    [16:05:29][Step 3/3] Step Sonar Report (Command Line) failed

    最佳答案

    问题是 known issue in PMD .

    将 SonarQube 中的 PMD 插件从 2.3 版更新到 2.4.1 版解决了我的问题。

    关于gradle - 使用 gradle sonarqube 插件执行错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32264753/

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