Maven 2 License Plugin: Easily Manage License Headers
All this required work is quite time expensive and a developer doesn't need to spend his or her time managing headers on source files.
Searching on the Internet, I found only these tools relative to license header:
- Release Audit Tool: http://code.google.com/p/arat/
- The Maven 2 plugin for RAT: http://mojo.codehaus.org/rat-maven-plugin/
- Another one (which I do not remember the name) that is just a command-line tool.
But these tools lack features. Using Maven intensively as a project
management tool, I wanted to have a Maven 2 plugin capable of checking
in the verify phase if the license headers are here, and of course with
the ability to add or update these headers.
Therefore I wrote a Maven 2 license plugin available at http://code.google.com/p/maven-license-plugin/ that anyone can use in his or her POM like this:
There are several other way of using it and a lot of configuration
options all documented on the Google project website.
To invoke the plugin, simply issue:
These are the two goals available, the first one to check if header are present and the other one to reformat source files.