sonar-maven-plugin

Sonar reports different line and branch coverage than Idea, Eclipse, Maven and Jenkins

拜拜、爱过 提交于 2020-01-03 17:16:33
问题 I have all those tools reporting the same coverage with JaCoCo: 69% line coverage and 23% branch coverage. Note: Screenshots had been taken over several days so they have slightly different values, but the variance is < 1% Jenkins: Maven: Eclipse: However Sonar reports different values: Maven project is structured as follows: main (aggregator) java module js (node) module You can see the same coverage reported on main and java modules, and no coverage for the js one. I'm using the latest

sonar maven plugin build error, SonarQube version: null

被刻印的时光 ゝ 提交于 2019-12-19 03:13:27
问题 My jenkins builds just started to fail with this message: [INFO] --- sonar-maven-plugin:2.7:sonar (default-cli) @ cividas-core-web --- [INFO] artifact com.ontimize:ontimize-core: checking for updates from central [INFO] artifact com.ontimize:ontimize-core: checking for updates from imatia-local [INFO] artifact com.ontimize:ontimize-core: checking for updates from snapshots [INFO] User cache: /var/lib/jenkins/.sonar/cache [INFO] SonarQube version: null [INFO] ----------------------------------

Automatically associate new Sonar project with custom quality profile and quality gate

拜拜、爱过 提交于 2019-12-12 18:36:29
问题 Our use case for Sonar creates new Sonar projects for each branch of our repository. How do we automatically associate the new branch project with a (non-default) Quality Profile and Quality Gate? We're running this in a Maven project if that's relevant. 回答1: We had the same issue, within our company, and the only solution was to use the deprecated attribute sonar.profile (https://docs.sonarqube.org/display/SONAR/Analysis+Parameters). Sidenote: Generally there is also a interesting view on

sonar-maven-plugin: Can not set sonar.sources src/main/resources

梦想与她 提交于 2019-12-11 06:45:40
问题 I have a problem with maven-sonar settings. I need to include all my project files at src/main/java and src/main/resources so that SonarQube will show results of all my files but exclude some files in src/main/resources/static/file . For test path it is already set by default at src/test/java This is How i set my POM.XML <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.4.1.RELEASE</version> <relativePath /> <!-- lookup parent

Sonar maven plugin: same project key for all modules does not work?

我与影子孤独终老i 提交于 2019-12-10 13:14:57
问题 I am using sonar-maven-plugin 3.2 and maven 3.3.9. In the parent POM, I have the sonar.projectKey maven property defined. The value is in effect, I can see it from the printout of sonar. But the mvn sonar:sonar step fails, because the maven modules use the same project key value, because the maven property has the same value in all modules. Sonar gives the error: Project '...' can't have 2 modules with the following key: ... Is there really no way to have a single sonar project that contains

sonar maven plugin build error, SonarQube version: null

旧城冷巷雨未停 提交于 2019-11-30 21:06:35
My jenkins builds just started to fail with this message: [INFO] --- sonar-maven-plugin:2.7:sonar (default-cli) @ cividas-core-web --- [INFO] artifact com.ontimize:ontimize-core: checking for updates from central [INFO] artifact com.ontimize:ontimize-core: checking for updates from imatia-local [INFO] artifact com.ontimize:ontimize-core: checking for updates from snapshots [INFO] User cache: /var/lib/jenkins/.sonar/cache [INFO] SonarQube version: null [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------