Exporting Jacoco*.exec files to Sonar without Maven or ANT or Jenkins - sonarqube

I don't know if this has been asked before; from a quick search I couldn't find anything relevant, but please do forgive me if I've missed it.
My question is we need to send the jacoco.exec output file to Sonar without using any other tool like Jenkins etc.
Below are the steps we did to configure Jenkins & Sonar
Jacoco agent code is setup and injected into our Application server (with WAS Console)
SonarQube is installed and configured in another server
When we perform manual execution on the application, jacoco is generating a Jacoco*.exec output files (File is in binary format)
Our challenge is how do we send this output file to Sonar, such that it reads and generates reports in a readable format?
PS. When integrated this with Jenkins and Maven, we are able to export this report to Sonar and see the reports properly. But, without using Jenkins and Maven, is there a way to export the Jacoco.exec file to Sonar and generate the reports??
Hope I am clear with my question. Please respond if any part of the question is not clear.
Thanks in advance for ur help!!

Related

How to get logs from a Jenkins plug-in during Maven based development?

I am developing a Jenkins plug-in and want to see some logging. I am using the Maven environment and running
mvn hpi:run
to launch Jenkins and my plug-in. I have enabled the Jenkins logger configuration to catch my logs - but I see no logs less severe than INFO.
So I guess that I need to configure something to drop my debugging logs into wherever (syslog?) Jenkins pulls them from (I am asking Jenkins to pull all logs).
Can someone please explain how to do this via Maven? I have seen the 'How to set jenkins log level from maven?' article and tried those techniques but this seemed to cause Jenkins to hang, with messages about console restarts.
Please be very specific as I'm a relative Java newbie and would rather you treated me like an idiot than gave me only half an answer, assuming I knew the rest ;-). Thanks!

Integrated JaCoCo results in SonarQube using Jenkins Maven Multitarget-App

after fighting now with integrating JaCoCo results into my SonarQube to see code coverage for more then one working day, I will try to open another post regarding this topic, because the internet is really messed with postings.
Preconditions:
SonarQube: Version 6.7.2
Maven: 3.5.2
Windows Server2012 R2
I successfully integrated Sonar Scan and results are published. I added the configuration for JaCoCo in the pom.xml of my application and the result files are generated after the build and just using the JaCoCo Jenkins plugin they can be displayed on the Jenkins dashboard. But I did not figure out what Analysis properties the Jenkins action "Execute SonarQube Scanner" needs in order to import the results and display them.
Is "scan" the correct operation or do I need something else to trigger the import?
I saw so many variantes of giving JaCoCo and Sonar the correct parameters, that I do not have a clear picture any more. Any hints maybe looking at my parameters?
As described in the docs, since you're building with Maven you should analyze with it too. There's some global setup you want to do (see the docs) but once that's done, you'll add this to your job instead of your current SonarQube Scanner build step:
$SONAR_MAVEN_GOAL -Dsonar.host.url=$SONAR_HOST_URL
Note that this needs to come after your build and test execution. The JaCoCo reports should be picked up automatically.
I successfully integrated it now with these Analyses properties and it is working.
sonar.projectName=
sonar.projectKey=
sonar.login =
sonar.password =
sonar.sources=./
sonar.java.binaries=./
sonar.jacoco.reportPaths=./trackingboard-service/target/jacoco.exec
sonar.jacoco.reportMissing.force.zero=true

How do I use Sonar Plugin with Hudson?

I want to use SonarQube for Code Quality analysis. I have Hudson as the CI tool and have integrated clearcase. How do I use SonarQube when the Ant build happens? Do I need to install SonarQube in a server and use a plugin to access it?
Can someone help me?
Install SonarQube web server as a first step. Default port will be localhost:9000.
After installing SonarQube you need to create an Ant target. Sample Script is available on GitHub. If Hudson is working correctly earlier. It will pick up the changes in Ant Script and perform the Analysis. After the completion of Analysis report will be generated and accessible at SonarQube Web Dashboard.

getting trouble to generate sonar test report

I am using sonarqube on my windows server, and it is working find from my client PCs, now I need to generation sonar test report in form of file, pdf, html or in any format to display it to my client. I tried but am not getting any solution, would you please help me, that how to export sonar test report from sonarqube server.
You're not finding that "report export" feature because SonarQube is about continually monitoring the evolution of your code, not printing out a point in time and pinning it to the wall.
If you really have to have something like this, then screenshots are the easiest way to go. Alternately, you can pull current state data using web services and build your own report.

how to paste sonar link on jenkins

I have set up jenkins with sonar to analyse my project which is in ANT.
I invoked the "Staandalone sonar analysis" with the path to the properties file and it runs fine, but after the test completes it does not create the sonar folder to see the results so how do i make the sonar link available to my end users on the jenkins page so that they can easily click to see the results
You're facing this limitation: http://jira.codehaus.org/browse/SONARPLUGINS-1522
We have several issues opened on this "link" topic, and we'll work on them all during the next sprint on the Jenkins sprint (you can find and watch them on our JIRA instance).

Resources