How to analyze Apache Camel backend projects for code quality and coverage?

  1. Is it possible to perform a meaningful code quality and coverage analysis by only providing the compiled jar files to the SonarScanner? If so, what are the recommended steps?

  2. If analyzing the jar files is not the correct approach, can you confirm the best practice? We are planning to integrate the analysis into our build process using maven so that both the source code and compiled classes are analyzed together. Is this the recommended method for an Apache Camel project?

  3. We are particularly interested in tracking code coverage. What is the standard way to configure test coverage reporting within our Maven or Gradle build and then have SonarQube import that data correctly?

Thank you for your time and help!

You must provide the source code for analysis!

I assume that you are, today, using Maven to build your code. You would want to use the SonarScanner for Maven.

Check out the docs on Java test coverage.