license headers in maven projects

Geertjan's old blog entry describes the general way of working with license headers. Let's add a few notes for all the Mavenites out there.

  • There is no UI for setting the license for your project currently
  • Use netbeans.hint.license property in your pom.xml file to point to the license header of choice. Please note that the ideal place for the property is the root parent pom of your project.
  • There are few magic spots where it works out of the box. The Maven examines the <license> /<url> elements in the pom and when matching one of the hardwired urls, assigns the license header automatically. The current magic urls are:
  • There is currently no way to add this magical mapping to your custom license templates. If you have an OSS license that you would like be added, file an issue at (with the license template attached and url pointing to the license on the web.
  • To have the license header added for your in-house non-OSS project, you can create a NetBeans module that will add the license header template declaratively. Ask me for details.

UPDATE: I've actually forgot to mention the name of the property to put in the pom.xml file. it's "netbeans.hint.license".

About this Entry

This page contains a single entry by mkleint published on March 28, 2010 10:57 AM.

The little things was the previous entry in this blog.

Goodbye NetBeans! is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.