*Next task* – adding a license-based header (template) to Netbeans 7 Maven-based projects.

This dzone article seems to relate to Ant based projects as I cannot see an Important Files (Smart) folder, nor can I see a nbproject/project.properties file.

However I found this netbeans forum discussion on the topic and it says that you modify the pom.xml adding this:

<name>My Application</name>

<licenses>
  <license>
    <name>The Apache Software License, Version 2.0</name>
    <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    <distribution>repo</distribution>
    <comments>A business-friendly OSS license</comments>
  </license>
</licenses>

<properties>
  ...

To the pom.xml (I added it as a top-level element as a child of and an adjacent sibling to <name> and <properites>.

If the URL is one of the following then the appropriate template (Tools > Templates) is used.

Don’t forget to set the properties such as user as discussed in the dzone article.

Written on October 31st, 2012 , My Projects, netbeans, Spritzer Tags: , ,

Brooke Smith is proudly powered by WordPress and the Theme Adventure by Eric Schwarz
Entries (RSS) and Comments (RSS).

Brooke Smith

Portfolio and site of a software engineer