Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

simple code metrics stand-alone maven plugin for java 7

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?

like image 831
radai Avatar asked Jan 11 '13 14:01

radai


1 Answers

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.

   mvn sonar:sonar

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.

like image 145
Mark O'Connor Avatar answered Nov 14 '22 23:11

Mark O'Connor