apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.62k stars 840 forks source link

[NETBEANS-54] Modeule Review j2ee.persistence #117

Closed juneau001 closed 6 years ago

juneau001 commented 6 years ago
juneau001 commented 6 years ago

Made all requested changes...will add those files as mentioned to the Rat report

junichi11 commented 6 years ago

Thank you for fixing them.

junichi11 commented 6 years ago

@matthiasblaesing What should we do about the external binary (https://github.com/apache/incubator-netbeans/tree/master/j2ee.persistence/external)?

matthiasblaesing commented 6 years ago

@junichi11 I would say that we remove the binary and embed the XSDs directly. From my perspective packaging the XSDs into a zip just masks the license. I consider these uncritical and covered by:

For small amounts of source that is directly consumed by the ASF product at runtime in source form, and for which that source is unmodified and unlikely to be changed anyway (say, by virtue of being specified by a standard), inclusion of appropriately labeled source is also permitted. An example of this is the web-facesconfig_1_0.dtd, whose inclusion is mandated by the JSR 127: JavaServer Faces specification.

Apache Legal FAQ - How should "Weak Copyleft" Licenses be handled

The whole point of the XSD is to conform to the specification and so I see no reason to change these.

junichi11 commented 6 years ago

@matthiasblaesing Thank you for your answer. License header's part should be OK if rat excludes and whitespace problems are fixed. I cannot tell about the external binary's part properly. However, I think you can do it. So, could you please tell @juneau001 about it?

Thanks.

matthiasblaesing commented 6 years ago

@juneau001 as Jun-ichi requested here what needs to be done to get rid of j2ee.persistence-external-resources.zip:

That file holds XSDs which describe the structure of the XML documents used in JPA. My argument why these files can be part of the source code can be found in the previous comment. Here is what currently happens:

  1. j2ee.persistence-external-resources.zip is downloaded into the external directory
  2. the build.xml of the module declares a build-init task, that unzips the files into the folder ./src/org/netbeans/modules/j2ee/persistence/dd/resources/
  3. From that directory these files are included into the final archive

So what I would do:

Eh voila, you untangled a situation, that needs resolving :-)

juneau001 commented 6 years ago

@matthiasblaesing I will look into addressing this situation soon and I will be in touch if I run into any issues. Thanks for outlining what needs to be done to resolve the situation!

emilianbold commented 6 years ago

I see that external/j2ee.persistence-external-resources.zip files have the standard CDDL + GPL w/ CPE dual license. So, even if you include those as-is in the codebase you still have to preserve the license header, exclude the files from Rat and also need to add in the NOTICE file that Apache NetBeans elects CDDL.

The current license mentions:

  If you
  don't indicate a single choice of license, a recipient has the
  option to distribute your version of this file under either the
  CDDL, the GPL Version 2 or to extend the choice of license to its
  licensees as provided above.

I wonder if we can have a single line for all such situations:

Apache NetBeans elects the CDDL license for all code licensed under a dual CDDL and GPL with ClassPath exception license.

juneau001 commented 6 years ago

@matthiasblaesing @emilianbold Thanks for the info. Please let me know how you'd like for me to proceed with the .zip file cleanup. Should I take the steps as outlined by Matthias, or should I do as mentioned by Emilian? Thanks

matthiasblaesing commented 6 years ago

I would expand the zip in any case. In the worst case this exposes the licenses of the files. There are four licenses present:

To get this done I would extract the files and let RAT checks them. If the licenses are correctly detected I would conclude work and postpone the discussion for later, if rat does not detect license, that should be fixed.

juneau001 commented 6 years ago

I've expanded the zip file and committed the changes. Let me know if I need to modify the license headers after the RAT checks.

Thanks

geertjanw commented 6 years ago

I see about 15 files in j2ee.persistence that have problematic license headers (or none) of some kind: https://builds.apache.org/job/incubator-netbeans-linux/lastSuccessfulBuild/artifact/nbbuild/build/rat-report.txt

juneau001 commented 6 years ago

Thanks @geertjanw we ran into an issue with this package due to a ZIP file containing additional files requiring license updates. @matthiasblaesing Would you like me now to adjust the license headers for those files which I extracted? Thanks

geertjanw commented 6 years ago

I think that makes sense, yes, i.e., please adjust license headers of those files.

matthiasblaesing commented 6 years ago

Please be careful. The contents of the ZIP dies not belong to the netbeans cidebase. In the ZIP XSDs are contained, that hold the XML grammar.

We should see why Rat does not detect CDDL/GPLv2CPE and EDL/EPL. From legal perspectice the file can IMHO stay. See abive für reasoning.

I'm writing from my phone, I'll have a look at this tonight.

Am 25. Oktober 2017 12:04:12 MESZ schrieb Geertjan Wielenga notifications@github.com:

I think that makes sense, yes, i.e., please adjust license headers of those files.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/apache/incubator-netbeans/pull/117#issuecomment-339280397

-- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

geertjanw commented 6 years ago

That makes sense, yes, don't relicense these from the ZIP, we need to figure out why they're caught by Rat -- and also make sure we're talking about the same files here.

juneau001 commented 6 years ago

I have modified the license headers for those xsd files that were contained within the archive ZIP file. Please let me know if you need anything else. Thanks

geertjanw commented 6 years ago

I think we need to investigate whether this is the right approach here.

juneau001 commented 6 years ago

OK, I need to revert that...sorry. I read on my phone and thought you wanted me to relicense. Give me a moment to revert. Thanks

geertjanw commented 6 years ago

Well, potentially it's OK. Let's wait and investigate.

juneau001 commented 6 years ago

I've got both versions available in my local repository...if I need to relicense then let me know and I can do it. Sorry about misreading your previous message. Too early here and just drinking my first cup of Java for the day.

matthiasblaesing commented 6 years ago

Ok - this still looks a bit chaotic:

This should do it.

juneau001 commented 6 years ago

@matthiasblaesing How are things looking now??? I performed the recommended changes in the order you had outlined.

matthiasblaesing commented 6 years ago

@juneau001 thank you. The commits still look strange (looks as if you merged master, but did neither the squash, nor the rebase). I took the changes consolidated that and pushed it as:

https://github.com/apache/incubator-netbeans/commit/7e6fdbd145e62b7e33156afa7ef2bf3524c93da7

That should take care of j2ee.persistence

juneau001 commented 6 years ago

Thanks @matthiasblaesing I appreciate the assistance. Not sure why the rebase and squash did not work, maybe I missed a commit in between.