iam using sonar latest i want initiate the sonar qube api from java project.my actual requirement is take the ststic report just giving the project loaction(ex:D://java project) like this.if u have any possiblity please let me know.
No, there is no web api call that takes a project file path as parameter.
You have to write your own script/plugin that makes use of the Sonarqube web api.
Also did you read about the sonar-cnes-report and Governance plugin in this post ?
Just to be sure you did understand Ann’s answer.
You may use the Sonarqube web api to set configuration and to get all details for existing
Sonarqube projects or your Sonarqube instance.
Those Sonarqube projects come to live after a Sonarqube analysis report is uploaded by
a Sonar scanner - Ann mentioned the existing scanners for maven, gradle, cli, ant, there is also
a Jenkins plugin.
The scanner runs typically inside Jenkins pipelines after the build stage.
After the analysis is done, the scanner uploads a report archive to Sonarqube server.
Sonarqube server evaluates the report, writes the results to database (see background tasks)
and sends webhooks to configured services (Jenkins …).
Only after that it makes sense to use the web api to get the results / metrics you’re after to create
your own reports / contents (pdf, cvs, …).
Also it’s possible the Sonarqube web ui is already sufficient for your needs !?
Project dashboards show all the metrics and there are also additional plugins.
i.e. i recommend the free SoftVis3D plugin for a code city view, which is great
hi i need some clarification in sonar.properties file.using that properties file can i trigger the particular project location(d://project)…and generate the sonar report for that project is it possible?or else how can i set up the sonar.properties file?
from your latest posting it seems the question is not about using the Sonarqube api but more like
how to do a Sonarqube analysis for a java project !?
What build tool do you use ? Maven, Gradle, Ant … ?
The settings like sonar.sources are set on scanner side, mostly inside a CI server
as Jenkins. With Maven you don’t have to set much properties, it simply works.
i have one more question.how to exclude the root project source classes in the multi module configuraion.for example :- project (root)
-projectB here i want exclude project(root) classes in the pom.is there any possible?