Assistance required with SonarQube API integration in Java program Description:

I am currently working on a Java program to integrate SonarQube API calls in order to perform code analysis and generate metrics. However, I am encountering some issues with the API integration and would appreciate your help in identifying the correct steps and APIs to use.

The program is currently designed to take the project name and source code directory as inputs, and use the SonarQube API to perform code analysis and generate metrics. However, I am encountering issues with authentication and receiving empty results when calling the API.

I am using SonarQube 8.9.1 and the latest version of the SonarQube Java client library. I have checked the API documentation for SonarQube 8.9.10 to ensure that I am using the correct endpoint and parameters, but am still experiencing issues.

Could you please provide some guidance on the right steps to follow and the APIs to use in order to successfully integrate SonarQube API calls in a Java program?

Hi,

Welcome to the community!

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.9.10 → 9.9

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes for 7.9 to 8.9, as well as the LTS to LTS release upgrade notes for 8.9 to 9.9 helpful. If you have questions about upgrading, feel free to open a new thread for that here.

Regarding your question, the only way to run an analysis is with a SonarScanner.

 
Ann