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

[GitHub] incubator-netbeans pull request #52: First batch of xml modules for review

GitHub user matthiasblaesing opened a pull request:

    https://github.com/apache/incubator-netbeans/pull/52

    First batch of xml modules for review

    Please see the individual commits for the details.
    
    The biggest changeset comes from xml.text, as there many unittest files 
    were adjusted to contain a header and in turn the unittests were modified
    accordingly.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/matthiasblaesing/incubator-netbeans xml1-review

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-netbeans/pull/52.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #52
    
----
commit fc3b05a7427294c4ee165d5463e583f04057b9ee
Author: Matthias Bläsing <mb...@doppel-helix.eu>
Date:   2017-10-03T16:18:44Z

    [NETBEANS-54] Module review xml.text.obsolete90
    
    - no external library
    - checked Rat report; added license header to testfiles and ensured 
      tests still run cleanly, removed unused file, that only differs from
      neighbouring file by license
    - skimmed through the module, did not notice additional problems

commit 6e2e69edb6b6d0543938d99c00f62ccbe3948434
Author: Matthias Bläsing <mb...@doppel-helix.eu>
Date:   2017-10-03T16:41:58Z

    [NETBEANS-54] Module review xml.core
    
    - no external library
    - checked Rat report; added license header to testfiles
    - skimmed through the module, did not notice additional problems

commit 74d7170729987212710f0572abe4372decfa0db9
Author: Matthias Bläsing <mb...@doppel-helix.eu>
Date:   2017-10-03T17:07:59Z

    [NETBEANS-54] Module review xml.retriever
    
    - no external library
    - checked Rat report; added license header to testfiles
    - skimmed through the module, did not notice additional problems

commit 2eb40408a380977d58650fdd2bf70e0170a7e1ca
Author: Matthias Bläsing <mb...@doppel-helix.eu>
Date:   2017-10-03T17:17:53Z

    [NETBEANS-54] Module review xml.multiview
    
    - no external library
    - checked Rat report; added license header to testfiles, manually 
      updated unconverted license headers
    - skimmed through the module, did not notice additional problems

commit d320afd4cc151f250b6b424476832dfa9d06ddd7
Author: Matthias Bläsing <mb...@doppel-helix.eu>
Date:   2017-10-03T17:57:06Z

    [NETBEANS-54] Module review xsl
    
    - no external library
    - checked Rat report; added testfiles to exclude list for rat
    - skimmed through the module, did not notice additional problems

commit 2fe14876dca137fc2653d2eeacbd78895288fb2e
Author: Matthias Bläsing <mb...@doppel-helix.eu>
Date:   2017-10-03T19:17:52Z

    [NETBEANS-54] Module review xml.text
    
    - no external library
    - checked Rat report; added license to many test files and adjusted
      tests to match these; exclude GUI visible sample data and sepcial
      test data
    - skimmed through the module, did not notice additional problems

----


---

[GitHub] incubator-netbeans pull request #52: [NETBEANS-54] Module review xml modules

Posted by junichi11 <gi...@git.apache.org>.
Github user junichi11 commented on a diff in the pull request:

    https://github.com/apache/incubator-netbeans/pull/52#discussion_r143345445
  
    --- Diff: xml/src/org/netbeans/modules/xml/resources/templates/emptyXmlSchema.xsd.template ---
    @@ -1,4 +1,24 @@
     <?xml version="1.0"?>
    +<#--
    +
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +      http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +
    +-->
    --- End diff --
    
    It seems that the license header is visible for users. 


---

[GitHub] incubator-netbeans pull request #52: [NETBEANS-54] Module review xml modules

Posted by junichi11 <gi...@git.apache.org>.
Github user junichi11 commented on a diff in the pull request:

    https://github.com/apache/incubator-netbeans/pull/52#discussion_r143345452
  
    --- Diff: xml/src/org/netbeans/modules/xml/resources/templates/xml_entity.ent.template ---
    @@ -1,4 +1,24 @@
     <?xml version="1.0" encoding="UTF-8"?>
    +<#--
    +
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +      http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +
    +-->
    --- End diff --
    
    It seems that the license header is visible for users. 


---

[GitHub] incubator-netbeans issue #52: [NETBEANS-54] Module review xml modules

Posted by matthiasblaesing <gi...@git.apache.org>.
Github user matthiasblaesing commented on the issue:

    https://github.com/apache/incubator-netbeans/pull/52
  
    I get the feeling, that we are running in circles:
    
    - Junichi established, that there are templates that already today carry a license header (just the wrong one) (In the IDE Tools -> Templates -> Other -> html, verified in 8.2)
    - I'm only talking about freemarker templates, that offer the option to add a comment header, that does not go into the resulting file (again, try with the html template, you end up with a file without the GPL+CDDL header). Plaintext templates, that are copied verbatim or just allow text replacement won't be touched by me.
    - If a developer looks at the templates he should already now that netbeans is ALv2 licensed, else she/he is not even allowed to have it (at least for Germany no right are granted to third parties by default, so if you assume I gave you no license, you are plainly not allowed to use it)
    - Having headers makes license review easier
    - Apart from a feeling no argument was raised against adding the license header, in fact for developers it might be good to get into the habit to "survive" seeing a license.


---

[GitHub] incubator-netbeans pull request #52: [NETBEANS-54] Module review xml modules

Posted by junichi11 <gi...@git.apache.org>.
Github user junichi11 commented on a diff in the pull request:

    https://github.com/apache/incubator-netbeans/pull/52#discussion_r143345425
  
    --- Diff: xml/src/org/netbeans/modules/xml/resources/templates/emptyDTD.dtd.template ---
    @@ -1,4 +1,24 @@
     <?xml version="1.0"?>
    +<#--
    +
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +      http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +
    +-->
    --- End diff --
    
    It seems that the license header is visible for users. (Tools > Templates > XML > DTD Entitty : Opne in Editor)
    ![apache-nb-module-review-xml-templates](https://user-images.githubusercontent.com/738383/31313624-08ab3982-ac23-11e7-949d-b8bdaec2da57.png)



---

[GitHub] incubator-netbeans issue #52: [NETBEANS-54] Module review xml modules

Posted by matthiasblaesing <gi...@git.apache.org>.
Github user matthiasblaesing commented on the issue:

    https://github.com/apache/incubator-netbeans/pull/52
  
    @emilianbold @junichi11 given that the html module has a GPLv2/wCPE+CDDL license
    
    http://mail-archives.apache.org/mod_mbox/incubator-netbeans-dev/201710.mbox/%3CCAEF8jVfgnfUVAzntSRDYE%2BST%3DwreSced3xJ%2BChBOkdX51ExZJw%40mail.gmail.com%3E
    
    does this fix the issues you have with this?


---

[GitHub] incubator-netbeans pull request #52: [NETBEANS-54] Module review xml modules

Posted by junichi11 <gi...@git.apache.org>.
Github user junichi11 commented on a diff in the pull request:

    https://github.com/apache/incubator-netbeans/pull/52#discussion_r143345436
  
    --- Diff: xml/src/org/netbeans/modules/xml/resources/templates/emptyXML.xml.template ---
    @@ -1,4 +1,24 @@
     <?xml version="1.0" encoding="${fileEncoding}"?>
    +<#--
    +
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +      http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +
    +-->
    --- End diff --
    
    It seems that the license header is visible for users. 


---

[GitHub] incubator-netbeans issue #52: [NETBEANS-54] Module review xml modules

Posted by matthiasblaesing <gi...@git.apache.org>.
Github user matthiasblaesing commented on the issue:

    https://github.com/apache/incubator-netbeans/pull/52
  
    Thank you for looking into this. I disagree with your assessment about the license header for the templates. I draw the line between the template and its result.
    
    The template itself is ALv2 licensed, but its intention is to create code and that is not covered by the ALv2 license. So the license header belongs into the template if it does not interfere with the generation process and in the cases of the XML templates all templates were freemarker templates, so the ALv2 header I added is only in the template itself, not in the resulting code.
    
    In fact the license for the resulting code comes from the project properties.


---

[GitHub] incubator-netbeans pull request #52: [NETBEANS-54] Module review xml modules

Posted by junichi11 <gi...@git.apache.org>.
Github user junichi11 commented on a diff in the pull request:

    https://github.com/apache/incubator-netbeans/pull/52#discussion_r143345448
  
    --- Diff: xml/src/org/netbeans/modules/xml/resources/templates/xhtml.xml.template ---
    @@ -1,4 +1,24 @@
     <?xml version="1.0" encoding="UTF-8"?>
    +<#--
    +
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +      http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +
    +-->
    --- End diff --
    
    It seems that the license header is visible for users. 


---

[GitHub] incubator-netbeans pull request #52: [NETBEANS-54] Module review xml modules

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-netbeans/pull/52


---

[GitHub] incubator-netbeans issue #52: [NETBEANS-54] Module review xml modules

Posted by emilianbold <gi...@git.apache.org>.
Github user emilianbold commented on the issue:

    https://github.com/apache/incubator-netbeans/pull/52
  
    @matthiasblaesing: so far I have been excluding template files from Rat. They are user visible as far as I can tell and I don't believe it's good for NetBeans to have that. Maybe there is some flag or something in the non-dev builds that hide the licese... I have yet to see the license header disappear when shown.


---

[GitHub] incubator-netbeans issue #52: [NETBEANS-54] Module review xml modules

Posted by emilianbold <gi...@git.apache.org>.
Github user emilianbold commented on the issue:

    https://github.com/apache/incubator-netbeans/pull/52
  
    > I disagree with your assessment about the license header for the templates. I draw the line between the template and its result.
    
    I believe we should discuss this on the dev@ mailing lists.
    
    Personally I see it as a bad move to scare users that generated code might be Apache-licensed.


---

[GitHub] incubator-netbeans issue #52: [NETBEANS-54] Module review xml modules

Posted by matthiasblaesing <gi...@git.apache.org>.
Github user matthiasblaesing commented on the issue:

    https://github.com/apache/incubator-netbeans/pull/52
  
    The remarks were fixed (templates lost their headers again) and the result merged into master.


---

[GitHub] incubator-netbeans issue #52: [NETBEANS-54] Module review xml modules

Posted by emilianbold <gi...@git.apache.org>.
Github user emilianbold commented on the issue:

    https://github.com/apache/incubator-netbeans/pull/52
  
    I really believe this should be discussed on dev@. There are two email threads, one started by me and one by @junichi11 for mentors (which haven't replied).
    
    We are not running in circles, you just want license headers everywhere!
    
    There are various types of 'templates': 
    
    1. example text displayed to users as preview in Options window and elsewhere
    2. freemarker templates used internally and
    3. freemarker templates the user is also able to see and edit (eg. Open in Editor for Tools | Templates).
    
    The general direction I am using is simple:
    
    * if a file has the Oracle template I will replace it, regardless. We'll think of the user-facing impact later.
    * for templates without an existing Oracle license header, I will not add a license header but exclude it from Rat.
    
    The only exception where I would add the license header is category 2 where it is clear the end user does not get to see or edit the template. But we have to prove this for each individual file and it's not really worth the trouble because these templates are simple (not much Intelectual Property, really) and the lack of a license header does not imply Public Domain anyhow (the whole of NetBeans does have a license).
    
    I don't think it's up to us to teach developers copyright and patent law.
    
    A lot of developers are really clueless about the legal ramifications and they will dislike a lot seeing Apache license headers in "their" code generation pipeline (because, aren't they creating derivative works? Actually, they are!).
    
    By the time you have them thinking about this (or, maybe even, ask their own legal counsel) you have already lost a customer.


---