I am using ANT as a build tool and would like to reuse my checkstyle and findbugs reports in sonar. i m using sonar-runner to get the code coverage overview, so please could someone suggest me a way so as how to achieve it?
Asked
Active
Viewed 1,329 times
2 Answers
2
My recommendation is to simplify your ANT build and use Sonar to run findbugs and checkstyle.
Sonar is designed to run tools like findbugs, checkstyle and PMD against Java code by default. It will download the software and perform this analysis automatically, most importantly it will do this based on the quality profile settings you've setup on the Sonar server.
Only "dynamic" metric reports like code coverage reporting are externally loaded.
Update
Sonar has an ANT task which can be integrated into your build.
The following answer provides and example of using Sonar with ANT

Community
- 1
- 1

Mark O'Connor
- 76,015
- 10
- 139
- 185
-
thanks for your input but since i am new to sonar and is using ANT and not Maven...please could you guide me so as how to achieve it also i am using jenkins and sonar-runner to run sonar – user1720124 Oct 11 '12 at 09:21
-
@user1720124 I have updated my answer. The Jenkins plugin could be used, but I'd recommend using the ANT task. It offers better integration with your build logic (For example classpaths and build properties) – Mark O'Connor Oct 11 '12 at 21:31
0
You can use the Ant task for the purpose.
Since sonar 2.6 folks have improved the ANT support.
Download the Sonar Ant task, Update your Script

TKV
- 2,533
- 11
- 43
- 56