简体   繁体   English

错误的项目关键与詹金斯建立声纳分析

[英]Wrong projectKey with Jenkins Build on Sonar Analysis

I'm having some trouble and I'm trying to fix my Jenkins builds. 我遇到了一些麻烦,我正在尝试修复我的Jenkins版本。

I use it to build the same project but different branches. 我用它来构建相同的项目,但不同的分支。 So, to separate the result for the Sonar analysis. 因此,要分离声纳分析的结果。

In the Build tab from my project, the options I set are : clean install -DtestFailureIgnore sonar:sonar -Dsonar.projectKey=MY_PROJECT_KEY 在我项目的Build选项卡中,我设置的选项是: clean install -DtestFailureIgnore sonar:sonar -Dsonar.projectKey=MY_PROJECT_KEY

For some builds, it just works perfectly fine, and for some others, my project key in Sonar become groupId:artifactId using the pom.xml data, and it makes Sonar mixing some of the branches. 对于某些构建,它只是工作得很好,对于其他一些,我在Sonar中的项目键变为groupId:artifactId使用pom.xml数据,它使Sonar混合了一些分支。

Does anyone know how to help about that problem? 有谁知道如何帮助解决这个问题?

Sonar version: 5.4 声纳版本: 5.4

Jenkins version: 1.651.1 詹金斯版本: 1.651.1

This is expected behaviour. 这是预期的行为。 When analysing Maven projects with the SonarQube Scanner for Maven , sonar.projectKey is automatically set to <groupId>:<artifactId> . 使用SonarQube Scanner for Maven分析Maven项目时, sonar.projectKey会自动设置为<groupId>:<artifactId>

To analyse different branches of the same project: do not override sonar.projectKey , simply use the sonar.branch parameter. 要分析同一项目的不同分支:不要覆盖sonar.projectKey ,只需使用sonar.branch参数。

Full details in the SonarQube Analysis Parameters documentation . SonarQube分析参数文档中的完整详细信息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法通过具有Jenkins构建和Maven项目的Sonar分析中的ClassLoader警告访问“ XXX / XXX / XXX”类 - Class 'XXX/XXX/XXX ' is not accessible through the ClassLoader warning in Sonar analysis with Jenkins build and maven project Jenkins-sonar构建错误 - Jenkins-sonar build error 声纳分析导致0个文件通过Jenkins在Maven项目上建立索引 - Sonar analysis causes 0 files indexed on a maven project through Jenkins 使用Maven而不是SonarRunner从Jenkins调用Java和Java语言的Sonar分析 - calling Sonar analysis of Java and Javascript from Jenkins using Maven not SonarRunner 基于 jenkins 构建失败,原因是声纳分析失败 - Build on jenkins failed couse sonarqube analysis failed 在 Jenkins 1.620 SonarQube 5.1.1 中运行声纳分析时,SVN 身份验证失败 - SVN authentication failure when running a Sonar analysis in Jenkins 1.620 SonarQube 5.1.1 从Jenkins / Hudson Plugin运行时,如何在声纳报告中从cobertura分析中排除类? - How to exclude classes from cobertura analysis in sonar report when running from Jenkins/Hudson Plugin? SonarQube 扫描仪执行期间出错 错误:“您必须为‘未知’定义以下强制属性:sonar.projectKey” - Error during SonarQube Scanner execution ERROR: “You must define the following mandatory properties for 'Unknown': sonar.projectKey” Jenkins管道出口代码137:在声纳分析中,Maven构建失败 - Jenkins pipeline exit code 137: maven build fails at sonarqube analysis 当我从Eclipse(Juno)运行Sonar本地分析时出错-我使用Maven构建 - Error when i run Sonar local analysis from Eclipse (Juno) - i used maven to build
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM