I’m looking for a way to generate a simple metrics report (more specifically, lines of code) for a maven multi-module java 7 build.
- I’ve tried the maven javancss plugin but it chokes on java 7
syntax and seems to be abandoned. - I know about the maven sonar plugin but I dont want to install
(and maintain) a sonar installation, I’d just like a simple static
html. - I’ve looked at cloc and code analyzer but couldnt find any
way of integrating them into a maven build
So my question is – how do I do this?
Sonar is really easy to install. Download the package unzip it and run the batch script. It will use an embedded database and web server
Running Maven as follows assume Sonar is running locally, so you won’t need any special configuration in your POM.
I suggest trying it out. It would seem to be more complex, but the Sonar team have done a lot of work to make Sonar really easy to use.