[NETBEANS-281] Add ASF license template#367
[NETBEANS-281] Add ASF license template#367junichi11 merged 2 commits intoapache:masterfrom lbruun:ASFLicInIDE
Conversation
Adds the ASF license template to the IDE. The new license template has a unique name of 'apache20asf'.
|
Thank you for your work. However, this template file already exists[1]. (#174) If netbeans modules are opened in Apache NetBeans, the license header is added automatically. |
|
Ouch, I wasn't aware of your PR, Junichi. Our approaches are different, though. I'n my mind there isn't a template for a "NetBeans license", but one for ASF projects in general .... which NetBeans project happens to use. With this approach it shows up in "Tools --> Templates --> Licenses" and it can be used just as well for those who use the NetBeans IDE to contribute to Tomcat, Cassandra, Maven, or whatever. I'll see if the two approaches can be merged so that we can get the best of both. My PR definitely shouldn't be merged as-is. |
|
No problem :) Probably, we should just change the file name and display name.
If you want to do that, please feel free to do that. Otherwise, I'll do that :) |
|
@junichi11. Yes, agree on approach. I need to reverse some of PR174, so that the template text file exist in I also need to understand why you turn the header into a Javadoc comment: See NETBEANS-161. Or do I misunderstand what that lingo means? I think it may be due to the fact that you made your PR in October and probably modeled after the then current state of affairs. It was in November that we realized that we had done a mistake on all Apache NetBeans source files and reversed that in PR282. Other than that I know what I need to do to get the best of both. :-) |
|
Apologies. Missed that. |
|
No problem. |
Merge the idea in PR174 into this change.
|
@junichi11. Great if you can review latest amendment I did. The provider of the license template is now |
| <attr name="displayName" bundlevalue="org.netbeans.modules.apisupport.project.ui.Bundle#Templates/Licenses/license-cddl-netbeans-sun.txt"/> | ||
| <attr name="mavenLicenseURL" stringvalue="http://www.netbeans.org/cddl-gplv2.html"/> | ||
| </file> | ||
| <file name="license-apache20-netbeans.txt" url="license-apache20-netbeans.txt"> |
There was a problem hiding this comment.
?. That line is deleted.
There was a problem hiding this comment.
Yes, should be fixed in the same module. i.e. Please don't delete this line. (Please don't change projectui.)
There was a problem hiding this comment.
Not sure I understand. This part of layer.xml in apisupport.ant is no longer relevant and is therefore deleted. The license template file is now supplied from projectui module.
There was a problem hiding this comment.
Note : The license template file must be supplied by projectui module so that it can be used by any type of project which wishes to use it. In the old days the license header for CDDL NetBeans project lived in apisupport.ant because it was a very special template which didn't have relevance outside of NetBeans itself. But this is different now. The ASF header is relevant for any project under the ASF, not just Apache NetBeans itself. This is why projectui is now the provider of the ASF lic template, just like for any other generic lic template.
The headers used in the old days was a special version of a CDDL header which applied only to the NetBeans project. The header used now is nothing special to NetBeans. This is what is different from old world.
We need to make ASF header generally available to any project that wishes to use it. This is why it needs to live in projectui module, not in apisupport.ant project. I hope this makes sense.
There was a problem hiding this comment.
No worries. I think you need to remove something here so that GitHub doesn't continue to flag it as "changed requested". Not sure how you do that.
| LBL_jnlp_master=JNLP Descriptor | ||
|
|
||
| Templates/Licenses/license-cddl-netbeans-sun.txt=NetBeans CDDL/GPL | ||
| Templates/Licenses/license-apache20-netbeans.txt=NetBeans Apache License 2.0 |
There was a problem hiding this comment.
?. That line is deleted.
There was a problem hiding this comment.
Yes, should be fixed in the same module. i.e. Please don't delete this line. (Please don't change projectui.)
There was a problem hiding this comment.
Not sure I understand. This line was used by the template registration in layer.xml but since I've deleted the template registration from this module the line is no longer relevant.
|
@lbruun Thank you for your contribution! Merged. |
Update CHANGELOG.md
Adds the ASF license template to the IDE. The ASF header is really just an Apache License v2 so I've kept
mavenLicenseURLthe same as for the standard Apache License v2.Edit: This PR builds on PR174 but makes the license header generally available to any type of development that wishes to use the ASF header, not just Apache NetBeans project itself. (thereby cateting for those who contribute to Tomcat, Cassandra, Maven, etc, and who use NetBeans IDE). Also the name and display name is changed to reflect that it is a generic ASF header, nothing specific to the Apache NetBeans project.
Usage
The new license template has a unique name of
apache20-asf, but if you set the project's license from the IDE's UI then you don't need to know that.Usage for Apache NetBeans Project itself
Should be automatic as long as Apache NetBeans 9 is used.