Moved!
This version at SourceForge is no longer maintained! As of version 2.0 it now resides at
http://github.com/tombensve/CodeLicenseManager. It has also changed package. For more
information se the new docs at the new place.
Features
Code License Manager is more or less what it sounds like. It was born out of frustration in the lack of a nice way to handle these things. Following is a short feature list, but see the user guide for more detailed information.
It supports the following:
- Updating source code with license "boilerplate" text and copyrights.
- Very easy to change license.
- No need for special source templates containing the license boilerplate text. Just create new source files from whatever template or none at all, and then run CodeLicenseManager "apply" before checkin.
- Updating source code with project information (description, current version, etc).
- Installing license texts for project license and third party licenses.
- For third party licenses a file listing the external dependencies using each license is also produced.
- Configurable where license texts should be installed.
- Running own source editing scripts.
- Can be run from:
- Maven (plugin).
- Can resolve project license, third party licenses, copyrights, project description, project version, etc from maven pom.
- Can download a third party license full text from "licenses/license/url" in the pom if the license cannot be found in an available license library.
- Can produce APT documents for maven-site-plugin with a page specifying the project license with a link to a generated license page, and all licenses used by third party products (with links to license) and a list of third party products using each license. This is a better replacement for the maven license report.
- Ant (task).
- Currently not supported due to a classloading problem with beanshell when run within an Ant task.
- Command line (java -jar).
- This to support running from makefiles for other languages than Java. This tool is not limited to only Java development, it can be used for any programming language. The platform the development is done on must however have a Java5 or higher Java VM available for running CodeLicenseManager.
- Requires an XML configuration file that is identical to the <configuration> section of the maven plugin.
- Uses license libraries for license boilerplate text and full license texts.
- A license library can point to the full license text on the web or include it as a text file.
- Includes a license library with the most common open source licenses.
- Easy to make own license libraries.
- Not only for open source. Can have private, closed source license in library.
- Uses source code update libraries (simply called source updaters) based on Bean Shell scripts for different languages and formats. Each script gets a programmable only text file editor instance with the current source file loaded and uses the editor methods to manipulate the text.
- Includes source updaters for the following types of comments:
- /* ... */ - Recognized language extensions: bsh, c, cpp, css, groovy, java.
- # - Recognized language extensions: sh, properties, ruby, py, perl, awk.
- <!-- ... --> - Recognized language extensions: htm, html, xml, xsd, xsl, xhtml, ent.
- <%-- ... --%> - Recognized language extensions: jsp.
- Annotations - Recognized language extensions: java, groovy.
- Easy to make your own source updater.
- Has 2 variants of source updaters for Java and Groovy:
- Project, license, and copyright information is provided in a comment block at the top of the file, just like for any other language.
- Project, license, and copyright information is provided in annotations on the class. Annotations jars available in 3 variants:
- Retention source only. (This is used by all Code License Manager code).
- Some with retention runtime, and some with retention source.
- All with retention runtime.
- Users can specify own scripts to run on source files in configuration either as separate script files or inline. These scripts can do whatever you want. For example update a constant with the products current version number, or whatever your creative mind can come up with. It is possible to run only user scripts without running source updater libraries.
- Requires Java5 or higher.