java - 如何将 SpringBoot 项目连接到 SonarQube
问题描述
我正在尝试使用 maven 插件将我的 Spring Boot 应用程序连接到 SonarCloud。具体来说,我正在尝试运行(我从 SonarCloud 教程中获得了这些说明):
mvn sonar:sonar \
-Dsonar.organization=myacconunt-github \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=mygeneratedtoken
一切似乎都很好,但我收到了这个错误:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project demo: You're only authorized to execute a local (preview) SonarQube analysis without pushing the results to the SonarQube server. Please contact your SonarQube administrator. -
我一直在检查我的用户的声纳权限,一切看起来都很好。我认为我的用户有权限,因为我有来自同一个 GitHub 帐户的另一个项目正在工作并由 Sonar 进行分析。你有类似的问题吗?
解决方案
感谢@Fabrice,我设法解决了这个问题。事实证明,我使用的是一个groupId:artifactId
已经在 SonarCloud 中使用的。所以只是改变groupId
或artifactId
工作。
推荐阅读
- python - IndexError:尝试将数据插入到 sqlite3 数据库时,位置参数元组的替换索引 2 超出范围
- python - 如何在乌龟的文本组中使用不同的颜色
- spring-boot - 使用 Jooq 配置 2 DataSource 的最佳实践
- jquery - 防止剑道详细信息模板中的重复
- autodesk-forge - 使用动态文件名的 Revit Design 自动化控制打开流程
- java - 声明类型为 T 的新对象
- razor-pages - 如何从 BS“selectpicker”更新缓存的列表/值(使用 c# MVC)
- django-forms - 使用 Django 表单集传递相关字段
- sql - 如何按没有聚合的列分组?
- vue.js - Vue.js 样式绑定不更新样式变量更改的 dom