Search code examples
javamaven-2continuous-integrationmetricscode-metrics

Is there any automated metrics collector for my Java project?


I'm trying to collect software code metrics in my Java project on every cycle of continuous integration. I'm interested mostly in size-related metrics like number of classes, number of methods, function points, lines of code, etc. I would like to get a summary report with these metrics in some XML file. Later I will use it in project report, or somehow else.

Is there any free open-source tool which I can integrate with Maven for this purpose?


Solution

  • One good option is Sonar.

    Its primary purpose is to manage technical debt, so it does a lot of things you don't need, but it provides really good metrics.

    You can integrate it with Hudson or whatever other continuous integration system you are using.