I need to use FindBugs 3.0 in Sonar qube for project running in Java-8 , the sonar server is shared by projects running java-6. (FindBugs 3.0 requires Java-7 to run) Is there any solution?
Java 7 is required to run analyses, but you can still analyze Java 6 code with FindBugs 3.0.
Related
I am migrating a Maven project that uses the sonar maven plugin to Gradle (plugin ver 3.2 / sonar server ver 5.1.2)
I assumed that I need the sonarqube gradle plugin. Of the bat there are two issues
The latest (and apparently only) version is compatible with sonar 5.6
For some reason the plugin wants to establish a jdbc connection although the sonar server is running on a remote machine and the sonar maven plugin
was able to operate without a local DB
What is the difference btw Sonar Runner and Sonar Scanner?.
And which version of "Sonarqube" and Sonar runner is required for JDK7?
Answer is very simple: "Runner" is the old name for "Scanner".
Everything you need to know about the different SonarQube Scanners is available on the Scanners part of the official documentation.
If you're stuck to Java 7, then you can use:
SonarQube Runner (sonar-runner) up to version 5.5 of SonarQube
SonarQube Scanner (sonar-scanner) 2.6.1
There was a known issue from 2014 that UnitTests written in Groovy cannot have their PASS/FAIL metrics uploaded into SonarQube.
http://sonarqube-archive.15.x6.nabble.com/Resource-not-found-for-Groovy-unit-tests-td5024669.html
Does anyone know if this issue is fixed? I am still have the issue with Sonar 6.1 using Spock unit tests and Gradle build system.
Any clue on the correct gradle sonar settings to make this happen?
The solution for us was to install the Groovy plugin in Sonarqube 6.1.
Once the plugin was installed, we could see the tests, with this command line:
./gradlew sonarqube -Dsonar.tests=src/test/groovy -Dsonar.junit.reportsPath=build/test-results/test/
We are using Spock as well (with Gradle, as you can see)
Sonar 5 returns no code coverage data using the groovy plugin and using cobertura for code coverage. Maven also fails to return code coverage.
Configure a test instance with SonarQube 5.4 and the flowing plugins:
Build Breaker 1.1
Findbugs 3.3
Git 1.2
Groovy 1.3.1
Java 3.9
JavaScript 2.11
LDAP 1.5.1
PHP 2.8
Python 1.5
SVN 1.3
Web Analyze HTML 2.4
PMD 2.5
The old instance with Version 4.3.2 works? Does the cobertura plugin need to be installed, since it has been deprecated, or can the Java plug-in provide the correct support?
Indeed the import of Cobertura reports is no more supported out of the box. This requires to install the following dedicated community SonarQube Cobertura plugin : https://github.com/SonarQubeCommunity/sonar-cobertura/releases
We have a server that runs Sonar and previously only had Java 6 installed and everything worked fine. We now have a Java 7 project and are encountering the "Unsupported major.minor version 51.0" version when the Maven surefire plugin tries to analyze the project.
Is there a way to specify the Java version sonar should use for a specific project?
Java 7 is already installed on the server.
Thanks in advance!
Never mind found the JDK option under Advanced in the Jenkins configuration for the job.