You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2017/10/11 08:01:34 UTC

License headers, template files, generated code

Hi,

There's been a number of discussions around this, here's my position
as an incubation mentor.

1. The ASF's policy for license headers is at
https://www.apache.org/legal/src-headers.html

2. As mentioned there, headers are not required for files "without any
degree of creativity in either its literal elements or its structure"

3. Such exceptions should be defined in a single place to be practical
- I suppose that's NetBean's main or parent pom

4. The fewer special cases the better, as those need to be reviewed
for each release - and discussions about special cases might be more
effort than just adding the headers.

5. If tools provided by NetBeans generate code, the result should
obviously *not* contain an Apache license header. I suppose user
settings can define which header the current user wants, if any.

6. If 5. is problematic for some types of templates, it's fine to add
a temporary exception for those templates, covered by a jira ticket
that describes the problem and gives it a unique ID. Fixing that would
be low priority but I think it should still be considered as a bug.

Hope this helps clarify things and happy to answer any questions.

-Bertrand

Re: License headers, template files, generated code

Posted by Junichi Yamamoto <ju...@gmail.com>.
Hi,

Thank you for your explanation.

Junichi

2017-10-11 17:01 GMT+09:00 Bertrand Delacretaz <bd...@apache.org>:
> Hi,
>
> There's been a number of discussions around this, here's my position
> as an incubation mentor.
>
> 1. The ASF's policy for license headers is at
> https://www.apache.org/legal/src-headers.html
>
> 2. As mentioned there, headers are not required for files "without any
> degree of creativity in either its literal elements or its structure"
>
> 3. Such exceptions should be defined in a single place to be practical
> - I suppose that's NetBean's main or parent pom
>
> 4. The fewer special cases the better, as those need to be reviewed
> for each release - and discussions about special cases might be more
> effort than just adding the headers.
>
> 5. If tools provided by NetBeans generate code, the result should
> obviously *not* contain an Apache license header. I suppose user
> settings can define which header the current user wants, if any.
>
> 6. If 5. is problematic for some types of templates, it's fine to add
> a temporary exception for those templates, covered by a jira ticket
> that describes the problem and gives it a unique ID. Fixing that would
> be low priority but I think it should still be considered as a bug.
>
> Hope this helps clarify things and happy to answer any questions.
>
> -Bertrand

Re: License headers, template files, generated code

Posted by Junichi Yamamoto <ju...@gmail.com>.
Hi,

> discussing this with Geertjan it seems the Oracle header was only added in
> for the donation - eg. in 8.2 you don't see a header in the IDE, now you do.

The commit that it was added is [1]. But probably, it was not merged
into the release82 branch. So, it seems that we don't see the license
header in NB8.2.

[1] http://hg.netbeans.org/releases/rev/e5106bc3d522

Thanks,
Junichi

Re: License headers, template files, generated code

Posted by Emilian Bold <em...@gmail.com>.
>
> This concerns me, particularly adding user viewable headers in them. *If*
> template output is a derivative work then it's hard to see how Bertrand's
> point 5 applies.
>


A FAQ entry like the following is something I'd very much like to avoid!
> It's why some projects deliberately put templates under no license.
>


https://www.eclipse.org/legal/eplfaq.php#CODEGEN


Oh, that FAQ is just glorious!

The only "sane" solution is to make the templates pluggable! You make
releases with your own templates but allow the community to make public
domain templates and if somebody really worries about that, they install
the public domain templates plugin.

Of course, a commercial tools vendor will have no such rigid restrictions
and will very nicely give you in writing with your invoice that those tiny
little templates don't create any derivative works when used.

--emi

On Wed, Oct 11, 2017 at 9:37 PM, Neil C Smith <neilcsmith.net@googlemail.com
> wrote:

> On Wed, 11 Oct 2017, 17:45 Matthias Bläsing, <mb...@doppel-helix.eu>
> wrote:
>
> >
> > and to be clear: The templates will never be Public Domain, even if
> > there is no license header they stay ALv2.
> >
>
> This concerns me, particularly adding user viewable headers in them. *If*
> template output is a derivative work then it's hard to see how Bertrand's
> point 5 applies.
>
> A FAQ entry like the following is something I'd very much like to avoid!
> It's why some projects deliberately put templates under no license.
>
> https://www.eclipse.org/legal/eplfaq.php#CODEGEN
>
> Best wishes,
>
> Neil
>
> > --
> Neil C Smith
> Artist & Technologist
> www.neilcsmith.net
>
> Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org
>

Re: License headers, template files, generated code

Posted by Neil C Smith <ne...@googlemail.com>.
On Wed, 11 Oct 2017, 17:45 Matthias Bläsing, <mb...@doppel-helix.eu>
wrote:

>
> and to be clear: The templates will never be Public Domain, even if
> there is no license header they stay ALv2.
>

This concerns me, particularly adding user viewable headers in them. *If*
template output is a derivative work then it's hard to see how Bertrand's
point 5 applies.

A FAQ entry like the following is something I'd very much like to avoid!
It's why some projects deliberately put templates under no license.

https://www.eclipse.org/legal/eplfaq.php#CODEGEN

Best wishes,

Neil

> --
Neil C Smith
Artist & Technologist
www.neilcsmith.net

Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org

Re: License headers, template files, generated code

Posted by Matthias Bläsing <mb...@doppel-helix.eu>.
Hey,

Am Mittwoch, den 11.10.2017, 16:38 +0000 schrieb Neil C Smith:
> Hi,
> 
> On Wed, Oct 11, 2017 at 3:54 PM Jaroslav Tulach <ja...@gmail.com> wrote:
> 
> > One option that I haven't seem discussed in this thread is to:
> > 
> > Have the license in the template files, but remove it during build.
> > 
> > 
> 
> That might also be a good option.  I've just put in a PR to replace the
> Oracle header with the Apache one in the form module templates.  However,
> discussing this with Geertjan it seems the Oracle header was only added in
> for the donation - eg. in 8.2 you don't see a header in the IDE, now you do.
> 
> Personally I'm happy to redo the PR and remove them.  And I still think
> licensing templates makes no sense - if we're saying that the user can put
> any license they want on the resulting code, then they're effectively
> public domain.

I raised:

https://issues.apache.org/jira/browse/NETBEANS-85

and to be clear: The templates will never be Public Domain, even if
there is no license header they stay ALv2.

Greetings

Matthias

Re: License headers, template files, generated code

Posted by Neil C Smith <ne...@googlemail.com>.
Hi,

On Wed, Oct 11, 2017 at 3:54 PM Jaroslav Tulach <ja...@gmail.com>
wrote:

> One option that I haven't seem discussed in this thread is to:
>
> Have the license in the template files, but remove it during build.
>
>
That might also be a good option.  I've just put in a PR to replace the
Oracle header with the Apache one in the form module templates.  However,
discussing this with Geertjan it seems the Oracle header was only added in
for the donation - eg. in 8.2 you don't see a header in the IDE, now you do.

Personally I'm happy to redo the PR and remove them.  And I still think
licensing templates makes no sense - if we're saying that the user can put
any license they want on the resulting code, then they're effectively
public domain.

Best wishes,

Neil
-- 
Neil C Smith
Artist & Technologist
www.neilcsmith.net

Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org

Re: License headers, template files, generated code

Posted by Jaroslav Tulach <ja...@gmail.com>.
One option that I haven't seem discussed in this thread is to:

Have the license in the template files, but remove it during build.
-jt

2017-10-11 16:02 GMT+02:00 Emilian Bold <em...@gmail.com>:

> If it's not user-visible, I say use the script to add them everywhere.
>
> --emi
>
>
> On Wed, Oct 11, 2017 at 4:58 PM, Neil C Smith
> <ne...@googlemail.com> wrote:
> > Hi Emi,
> >
> > On Wed, Oct 11, 2017 at 1:48 PM Emilian Bold <em...@gmail.com>
> wrote:
> >
> >> I believe most *.template files qualify here, that's why I've been
> >> excluding them from Rat in every module I've reviewed.
> >>
> >>
> > I noticed while talking through this with Geertjan that the templates in
> > the Form module do have a license header though and they're GPL/CDDL.
> >
> > Interestingly also noticed that the license header is stripped when you
> > open to edit.
> >
> > Best wishes,
> >
> > Neil
> > --
> > Neil C Smith
> > Artist & Technologist
> > www.neilcsmith.net
> >
> > Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org
>

Re: License headers, template files, generated code

Posted by Emilian Bold <em...@gmail.com>.
If it's not user-visible, I say use the script to add them everywhere.

--emi


On Wed, Oct 11, 2017 at 4:58 PM, Neil C Smith
<ne...@googlemail.com> wrote:
> Hi Emi,
>
> On Wed, Oct 11, 2017 at 1:48 PM Emilian Bold <em...@gmail.com> wrote:
>
>> I believe most *.template files qualify here, that's why I've been
>> excluding them from Rat in every module I've reviewed.
>>
>>
> I noticed while talking through this with Geertjan that the templates in
> the Form module do have a license header though and they're GPL/CDDL.
>
> Interestingly also noticed that the license header is stripped when you
> open to edit.
>
> Best wishes,
>
> Neil
> --
> Neil C Smith
> Artist & Technologist
> www.neilcsmith.net
>
> Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org

Re: License headers, template files, generated code

Posted by Neil C Smith <ne...@googlemail.com>.
Hi Emi,

On Wed, Oct 11, 2017 at 1:48 PM Emilian Bold <em...@gmail.com> wrote:

> I believe most *.template files qualify here, that's why I've been
> excluding them from Rat in every module I've reviewed.
>
>
I noticed while talking through this with Geertjan that the templates in
the Form module do have a license header though and they're GPL/CDDL.

Interestingly also noticed that the license header is stripped when you
open to edit.

Best wishes,

Neil
-- 
Neil C Smith
Artist & Technologist
www.neilcsmith.net

Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org

Re: License headers, template files, generated code

Posted by Emilian Bold <em...@gmail.com>.
> OTOH if there's a good reason (such as "makes the product better") to
omit license headers for a category of files that's easy to identify
and does not have creative content, it's possible to make a documented
decision to omit those headers.

I believe most *.template files qualify here, that's why I've been
excluding them from Rat in every module I've reviewed.


--emi


On Wed, Oct 11, 2017 at 1:15 PM, Bertrand Delacretaz
<bd...@apache.org> wrote:
> Hi,
>
> On Wed, Oct 11, 2017 at 12:02 PM, Neil C Smith
> <ne...@googlemail.com> wrote:
>> ...Would it not be better if all template files were explicitly public
>> domain if we want end users to have full control of the license for the
>> resulting file?...
>
> As an Apache project, NetBeans cannot release public domain files, the
> Apache License is one of our strongest invariants.
>
> OTOH if there's a good reason (such as "makes the product better") to
> omit license headers for a category of files that's easy to identify
> and does not have creative content, it's possible to make a documented
> decision to omit those headers.
>
> -Bertrand

Re: License headers, template files, generated code

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Wed, Oct 11, 2017 at 12:02 PM, Neil C Smith
<ne...@googlemail.com> wrote:
> ...Would it not be better if all template files were explicitly public
> domain if we want end users to have full control of the license for the
> resulting file?...

As an Apache project, NetBeans cannot release public domain files, the
Apache License is one of our strongest invariants.

OTOH if there's a good reason (such as "makes the product better") to
omit license headers for a category of files that's easy to identify
and does not have creative content, it's possible to make a documented
decision to omit those headers.

-Bertrand

Re: License headers, template files, generated code

Posted by Neil C Smith <ne...@googlemail.com>.
Hi,

On Wed, 11 Oct 2017, 09:01 Bertrand Delacretaz, <bd...@apache.org>
wrote:

>
> 5. If tools provided by NetBeans generate code, the result should
> obviously *not* contain an Apache license header. I suppose user
> settings can define which header the current user wants, if any.
>
> 6. If 5. is problematic for some types of templates, it's fine to add
> a temporary exception for those templates, covered by a jira ticket
> that describes the problem and gives it a unique ID. Fixing that would
> be low priority but I think it should still be considered as a bug.
>
> Hope this helps clarify things and happy to answer any questions.
>

OK, I have a question now! Given the point of a template is usually to copy
most of itself into the user's file, isn't that effectively saying that if
the user does that manually they have to preserve the license notice, but
that if NetBeans itself does it that's fine? This seems a strange ambiguity
to me. Would it not be better if all template files were explicitly public
domain if we want end users to have full control of the license for the
resulting file?

Best wishes,

Neil

> --
Neil C Smith
Artist & Technologist
www.neilcsmith.net

Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org