| View previous topic :: View next topic |
| Author |
Message |
tkellerer
Joined: 15 Aug 2008 Posts: 475
|
Posted: Mon Mar 01, 2010 9:25 am Post subject: How to assign a project license for a Maven project |
|
|
Hi,
for a "regular" NB project I can define a license file (to be included in the header of new source files) by setting project.license in NB's project.properties (although there is no GUI for that...)
How can I achieve this with a Maven based project?
I assume this could be done by adding something to nb-configuration.xml, but what?
Thanks
Thomas |
|
| Back to top |
|
 |
Dafe Simonek Posted via mailing list.
|
Posted: Mon Mar 01, 2010 9:54 am Post subject: How to assign a project license for a Maven project |
|
|
Licenses are specified in project's pom.xml in Maven, see
http://maven.apache.org/pom.html#Licenses for detail.
Dafe
tkellerer wrote:
| Quote: | Hi,
for a "regular" NB project I can define a license file (to be included in the header of new source files) by setting project.license in NB's project.properties (although there is no GUI for that...)
How can I achieve this with a Maven based project?
I assume this could be done by adding something to nb-configuration.xml, but what?
Thanks
Thomas
|
|
|
| Back to top |
|
 |
Milos Kleint Posted via mailing list.
|
|
| Back to top |
|
 |
tkellerer
Joined: 15 Aug 2008 Posts: 475
|
Posted: Mon Mar 01, 2010 10:18 am Post subject: Re: How to assign a project license for a Maven project |
|
|
| So, when I define the project license in my Maven pom, NetBeans will automatically insert that in the header of a new source file? |
|
| Back to top |
|
 |
tkellerer
Joined: 15 Aug 2008 Posts: 475
|
Posted: Mon Mar 01, 2010 10:24 am Post subject: Re: How to assign a project license for a Maven project |
|
|
Great, thanks.
Works like a charm (using profiles.xml) |
|
| Back to top |
|
 |
zhengxinhang
Joined: 16 Jan 2011 Posts: 1
|
Posted: Sun Jan 16, 2011 9:29 am Post subject: Share Template |
|
|
| Is it possible to share the license template within a team, so that everyone who checks out the project will automatically gets the license header inserted when creating new Java files? |
|
| Back to top |
|
 |
Adam Jurzyk Posted via mailing list.
|
Posted: Tue Jan 18, 2011 11:00 am Post subject: How to assign a project license for a Maven project |
|
|
On Sun, Jan 16, 2011 at 10:29 AM, zhengxinhang <address-removed> wrote:
| Quote: | Is it possible to share the license template within a team, so that everyone who checks out the project will automatically gets the license header inserted when creating new Java files?
|
Do you mean that you would like to automagicaly load template from
project directory and use it in Netbeans?
That's probably not possible right now but could be pretty cool.
For now you can only point Netbeans to licence existing in
~/.netbeans/6.9/config/Templates/Licenses/
by this property in pom.xml:
<properties>
<netbeans.hint.license>mylicense</netbeans.hint.license>
</properties>
Each developer has to copy license template to
~/.netbeans/6.9/config/Templates/Licenses/license-mylicense.txt
Template file name must by in this format: license-${netbeans.hint.license}.txt |
|
| Back to top |
|
 |
|