Tuesday, September 12, 2006

Maven Source-Formatting/-Metrics

I needed to add source code formatting and some code metrics to my maven based project. These are the places on the web where I found help.

I wanted to get the Jalopy plugin to format my source code, and promptly failed to get the snaptshots from the mojo projects without the help of this resource,
this resources helped me to get the codehaus mojo snapshot plugins:
What to put in settings.xml

after that I could simply run:

mvn -Pcodehaus jalopy:format

As I was bothered by the command line cluttering by -Pcodehaus, I actived the profile by adding <activeByDefault/> into the activation tag in the profile definiton for the "codehaus" profile.
Now ....

mvn jalopy:format

... and voila! Jalopy formatted my sources.

See also: maven Jalopy plugin

Very helpful for the "other" reports was an interesting java world article...

I also wanted JDepend to check my project, to I added Jdepend.

No comments: