Hi Ladies and Gentlemen,
We've quite big project with own build framework, based mostly on Java (however other languages exist).
We'd like to use Sonar Hudson plugin to graphically present various code metrics. How do we do this?
Do we need to change project structure and bring it to maven or there is a workaround to just specify where to get test results and other artifacts from?
Thank you
The method we are using is this:
it only has to perform test well, so specified hardcoded dependency references with
<scope>system</scope>
we didn't change the project structure for maven, you can specify in maven custom scr, test, resources directories (as long as you have only one src and test directory)
the command used in CI is
mvn clean compile sonar:sonar
We are using Continuum for the CI part, but it should work just as well in Hudson.
This method did not change any other build items, it's just custom made for Sonar. But it does open the way for a Continuous Integration (daily) build, or for using maven as a build tool. This method is similar to the "sonar light mode" described here
More information here:
You can use sonar without Maven. you just have to tell it where the rport files are with properties: sonar.cobertura.reportPath, sonar.clover.reportPath, sonar.surefire.reportsPath…
See here: http://sonar.codehaus.org/tag/ant/
There's a tick box to set these values when configuring the build in hudson - it is called "Check if this project is NOT built with maven2"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With