This is an automated email from the ASF dual-hosted git repository.

junichi11 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 1f49f22  Add a license header template for new files of NetBeans 
modules
1f49f22 is described below

commit 1f49f22f3897acc54635301f309f444f15ea4d46
Author: Junichi Yamamoto <[email protected]>
AuthorDate: Sun Oct 22 11:03:37 2017 +0900

    Add a license header template for new files of NetBeans modules
    
    There are differences between current license header and existing license 
template for Apache 2.0. So we should have a new template for NetBeans.
---
 .../queries/TemplateAttributesProvider.java        |  2 +-
 .../modules/apisupport/project/resources/layer.xml |  5 ++++
 .../resources/license-apache20-netbeans.txt        | 33 ++++++++++++++++++++++
 .../apisupport/project/ui/Bundle.properties        |  1 +
 .../nbproject/project.properties                   |  2 +-
 nbbuild/build.xml                                  |  1 +
 terminal/nbproject/project.properties              |  2 +-
 7 files changed, 43 insertions(+), 3 deletions(-)

diff --git 
a/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/TemplateAttributesProvider.java
 
b/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/TemplateAttributesProvider.java
index a738956..dc60282 100644
--- 
a/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/TemplateAttributesProvider.java
+++ 
b/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/TemplateAttributesProvider.java
@@ -63,7 +63,7 @@ public class TemplateAttributesProvider implements 
CreateFromTemplateAttributesP
         String licensePath = props.getProperty("project.licensePath"); // 
NOI18N
 
         if (license == null && netbeansOrg) {
-            license = "cddl-netbeans-sun"; // NOI18N
+            license = "apache20-netbeans"; // NOI18N
         }
         if (license == null && licensePath == null && project != null) {
             SuiteProject sp;
diff --git 
a/apisupport.ant/src/org/netbeans/modules/apisupport/project/resources/layer.xml
 
b/apisupport.ant/src/org/netbeans/modules/apisupport/project/resources/layer.xml
index 2b0ad2d..457ff40 100644
--- 
a/apisupport.ant/src/org/netbeans/modules/apisupport/project/resources/layer.xml
+++ 
b/apisupport.ant/src/org/netbeans/modules/apisupport/project/resources/layer.xml
@@ -261,6 +261,11 @@
                 <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">
+                <attr name="template" boolvalue="true"/>
+                <attr name="displayName" 
bundlevalue="org.netbeans.modules.apisupport.project.ui.Bundle#Templates/Licenses/license-apache20-netbeans.txt"/>
+                <attr name="mavenLicenseURL" 
stringvalue="http://www.apache.org/licenses/LICENSE-2.0"/>
+            </file>
         </folder>
         <folder name="Project">
             <folder name="APISupport">
diff --git 
a/apisupport.ant/src/org/netbeans/modules/apisupport/project/resources/license-apache20-netbeans.txt
 
b/apisupport.ant/src/org/netbeans/modules/apisupport/project/resources/license-apache20-netbeans.txt
new file mode 100644
index 0000000..66e6569
--- /dev/null
+++ 
b/apisupport.ant/src/org/netbeans/modules/apisupport/project/resources/license-apache20-netbeans.txt
@@ -0,0 +1,33 @@
+<#if licenseFirst??>
+    <#if licenseFirst == "/*">
+        <#assign licenseFirst="/**">
+    <#elseif licenseFirst == "<!--">
+        <#assign licensePrefix="    ">
+    </#if>
+${licenseFirst}
+</#if>
+<#if licenseFirst?? && licenseFirst == "<!--">
+${licensePrefix?replace(" +$", "", "r")}
+</#if>
+${licensePrefix}Licensed to the Apache Software Foundation (ASF) under one
+${licensePrefix}or more contributor license agreements.  See the NOTICE file
+${licensePrefix}distributed with this work for additional information
+${licensePrefix}regarding copyright ownership.  The ASF licenses this file
+${licensePrefix}to you under the Apache License, Version 2.0 (the
+${licensePrefix}"License"); you may not use this file except in compliance
+${licensePrefix}with the License.  You may obtain a copy of the License at
+${licensePrefix?replace(" +$", "", "r")}
+${licensePrefix}  http://www.apache.org/licenses/LICENSE-2.0
+${licensePrefix?replace(" +$", "", "r")}
+${licensePrefix}Unless required by applicable law or agreed to in writing,
+${licensePrefix}software distributed under the License is distributed on an
+${licensePrefix}"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+${licensePrefix}KIND, either express or implied.  See the License for the
+${licensePrefix}specific language governing permissions and limitations
+${licensePrefix}under the License.
+<#if licenseFirst?? && licenseFirst == "<!--">
+${licensePrefix?replace(" +$", "", "r")}
+</#if>
+<#if licenseLast??>
+${licenseLast}
+</#if>
\ No newline at end of file
diff --git 
a/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/Bundle.properties
 
b/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/Bundle.properties
index 267ae49..4ceb39a 100644
--- 
a/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/Bundle.properties
+++ 
b/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/Bundle.properties
@@ -75,6 +75,7 @@ HINT_suite_project_root_node=Module suite project in {0}
 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
 
 TestDataDirsNodeFactory.unit_test_data=Unit Test Data
 TestDataDirsNodeFactory.qa-functional_test_data=Functional Test Data
diff --git a/dlight.nativeexecution/nbproject/project.properties 
b/dlight.nativeexecution/nbproject/project.properties
index 9022579..14f5991 100644
--- a/dlight.nativeexecution/nbproject/project.properties
+++ b/dlight.nativeexecution/nbproject/project.properties
@@ -18,7 +18,7 @@ is.autoload=true
 javac.source=1.7
 javac.compilerargs=-Xlint -Xlint:-serial
 javadoc.arch=${basedir}/arch.xml
-project.license=cddl-netbeans-sun
+project.license=apache20-netbeans
 nbm.executable.files=bin/nativeexecution/**
 jnlp.indirect.files=bin/nativeexecution/**
 spec.version.base=1.40.13
diff --git a/nbbuild/build.xml b/nbbuild/build.xml
index 8444851..a7106a0 100644
--- a/nbbuild/build.xml
+++ b/nbbuild/build.xml
@@ -1993,6 +1993,7 @@ It is possible to use -Ddebug.port=3234 -Ddebug.pause=y 
to start the system in d
             <exclude name="*/build/**" />
             <exclude name="*/test/unit/data/**" />
             <exclude name="*/test/qa-functional/data/**" />
+            <exclude 
name="apisupport.ant/src/org/netbeans/modules/apisupport/project/resources/license-*.txt"
 /> <!--template file-->
             <exclude 
name="beans/src/org/netbeans/modules/beans/resources/templates/*.template" /> 
<!--license would be visible when users edit the templates inside their IDE-->
             <exclude 
name="css.editor/src/org/netbeans/modules/css/resources/CascadeStyleSheet.css.template"
 /> <!-- user visible template -->
             <exclude 
name="css.editor/src/org/netbeans/modules/css/resources/CssExample" /> <!-- 
user visible template -->
diff --git a/terminal/nbproject/project.properties 
b/terminal/nbproject/project.properties
index 7d7a305..10dc858 100644
--- a/terminal/nbproject/project.properties
+++ b/terminal/nbproject/project.properties
@@ -30,7 +30,7 @@ javac.compilerargs=-Xlint -Xlint:-serial
 javadoc.arch=${basedir}/arch.xml
 nbm.homepage=http://wiki.netbeans.org/TerminalEmulator 
 is.autoload=true
-project.license=cddl-netbeans-sun
+project.license=apache20-netbeans
 
 test.config.stableBTD.includes=**/*Test.class
 test.config.stableBTD.excludes=\

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to