远程运行Sonarqube 3.9.0时出现错误



当我在服务器上运行sonarqube时,我总是得到以下错误

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar (default-cli) on project <Project name >: Your project contains .java files, please provide compiled classes with sonar.java.binaries property, or exclude them from the analysis with sonar.exclusions property

当我在本地机器上运行Sonarqube时,它工作得很好。

我不知道我该去哪里做改变。我做了一些谷歌搜索并找到下面的url(如何正确配置属性"sonar.java.binaries"?),并提到我必须设置属性sonar.java.binaries=bin,我不确定这个属性文件在哪里。我如何在服务器上设置。你能请人帮忙吗?

我使用Java 11,Sonarqube版本8.9.0Maven版本3.9.0

另外,我找到了url(https://docs.sonarqube.org/latest/analysis/languages/java/)。它提到做一些改变管理方面如果我做了这些改变,它将反映全球。与项目无关。请帮帮我

当你使用maven做声纳分析时,你不需要手动配置。

错误(Your project contains .java files, please provide compiled classes with sonar.java.binaries property, or exclude them from the analysis with sonar.exclusions property)你正在经历,因为声纳maven插件期望编译的类在你的目标类文件夹和类文件丢失。这是由于在编译java文件之前执行声纳分析。

要解决这个问题,首先执行mvn package,然后执行maven声纳分析。

最新更新