I launch a sonar from Jenkins. I want to exclude some java files in a sonar report. Is this possible through Jenkins? If so, how can I do this?
Assuming you are using the jenkins sonar plugin, refer to this documentation on how to configure the plugin to specify additional parameters that exclude files from analysis.
Just pass the "sonar.exclusions" property to your assembly (for example, using the JVM argument "-Dsonar.exclusions = ** / Foo.java").
-Dsonar.exclusions=com/company/packageA/generated/**/*.java,com/company/packageB/generated/**/*.java
Notice how you can specify multiple packages with commas.