You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by GitBox <gi...@apache.org> on 2017/10/25 12:19:45 UTC

[GitHub] junichi11 closed pull request #174: Add a license header template for new files of NetBeans modules

junichi11 closed pull request #174: Add a license header template for new files of NetBeans modules
URL: https://github.com/apache/incubator-netbeans/pull/174
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 a73895637..dc60282be 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 TemplateAttributesProvider(NbModuleProject p, AntProjectHelper helper, bo
         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 2b0ad2d9c..457ff40ea 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 000000000..66e6569c7
--- /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 267ae495e..4ceb39a6c 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 90225792c..14f5991fb 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 84448511b..a7106a098 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 7d7a30544..10dc85866 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=\


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services