Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fragments for libs.javafx with JavaFX 11 implementation #917

Merged
merged 17 commits into from
Nov 22, 2018

Conversation

dukescript
Copy link
Contributor

JDK11 has dropped support for JavaFX. Certain parts of NetBeans IDE rely on JavaFX being present (namely the Java Frontend Application wizard). This PR is an attempt to package Maven JavaFX 11 libraries as fragments enhancing existing libs.javafx module that could be packaged as NBM and downloaded on demand when the users runs on JDK11 and enables support that relies on JavaFX webview.

@jlahoda
Copy link
Contributor

jlahoda commented Sep 28, 2018

So, I think this is a great idea - but the patch is adding the libraries to the standard (platform) build, no? While I would appreciate that, this does not seem to be allowed per Apache rules due to the license?

@svenreimers
Copy link
Member

I agree with Jan, great idea, but we will not be able to produce/use the binaries here at apache - so we need a similar solution to Jan's nbjavac.

@svenreimers
Copy link
Member

Concerning the OS dependency, could

OpenIDE-Module-Requires: org.openide.modules.os.Windows
OpenIDE-Module-Requires: org.openide.modules.os.PlainUnix 
OpenIDE-Module-Requires: org.openide.modules.os.MacOSX

help?

@dukescript
Copy link
Contributor Author

dukescript commented Oct 3, 2018

So, I think this is a great idea - but the patch is adding the libraries to the
standard (platform) build, no?
While I would appreciate that, this does not seem to be allowed per
Apache rules due to the license?

Right. The modules cannot be part of regular distribution. They need to be downloaded on demand. On the other hand, the NBMs could be hosted on Apache AU, as 4a7f7ba changes the NBMs to not contain the actual JAR files -only to download the JARs from Maven repository. The approach is based on IZ 195041.

I agree with Jan, great idea, but we will not be able to produce/use the
binaries here at apache - so we need a similar solution to Jan's nbjavac.

The 4a7f7ba approach is similar to nbjavac one, moreover it avoids the need to host anything outside of Apache and Maven download locations.

Concerning the OS dependency, could

OpenIDE-Module-Requires: org.openide.modules.os.Windows
OpenIDE-Module-Requires: org.openide.modules.os.PlainUnix
OpenIDE-Module-Requires: org.openide.modules.os.MacOSX
help?

I am not sure I understand the comment. There is OpenIDE-Module-Needs in each of the module manifests with almost identical behavior to OpenIDE-Module-Requires.

@svenreimers
Copy link
Member

Ok, understood. Still the module hosted on Apache UpdateCenter needs the GPL license - is this ok with Apache? Do we need clarification for this?

@dukescript dukescript changed the title WIP: Fragments for libs.javafx with JavaFX 11 implementation Fragments for libs.javafx with JavaFX 11 implementation Nov 17, 2018
@dukescript
Copy link
Contributor Author

The change creates three new modules and puts them into extra cluster: libs.javafx.linux, libs.javafx.macosx, libs.javafx.win. These modules are wrappers around OpenJFX maven JARs, however none of the modules contains the GPL licensed JARs by itself - it just references them and the plugin manager downloads them directly to the user when installing them.

As such it is important for the modules to not be present in the final ZIP and only available from an update center. Putting the modules into extra cluster manages the first part - they aren't in the ZIP. To make them available from an update center this change introduces a "local" update center that holds the (empty) NBM files. Ready for install at any time.

The changes were tested on JDK8 and JDK11. On JDK8 only nb-javac is downloaded. On JDK11 one can continue without downloading anything, or download both: the nb-javac as well as appropriate openjfx library.

Please review, approve, integrate. Thanks in advance @jlahoda, @sdedic, @svenreimers!

Copy link
Member

@sdedic sdedic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, tested, seems not to break antyhing + downloads javafx on JDK11.

@sdedic
Copy link
Member

sdedic commented Nov 21, 2018

@dukescript would you please squash related or "unimportant" commits, so we do not pollute git history too much ? Thanks.

@dukescript
Copy link
Contributor Author

@sdedic Thanks a lot for testing. I think in this case having detailed history is useful, as the commits contain the info of the required steps. So if someone is facing a similar problem, or the approach needs to be updated/enhanced for future releases, having the individual commits will be helpful for understanding what's going on.

@sdedic sdedic merged commit 56231e6 into apache:master Nov 22, 2018
@matthiasblaesing
Copy link
Contributor

I just build netbeans master (clean source tree, just running ant so building the default cluster) and noticed, that the LICENSE file now lists GPL-2-CP files:

matthias@athena:~/src/incubator-netbeans$ cat nbbuild/netbeans/LICENSE | grep GPL-2-CP                                                                                                              
extra/modules/ext/javafx-base-11-linux.jar                            GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-base-11-mac.jar                              GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-base-11-win.jar                              GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-controls-11-linux.jar                        GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-controls-11-mac.jar                          GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-controls-11-win.jar                          GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-graphics-11-linux.jar                        GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-graphics-11-mac.jar                          GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-graphics-11-win.jar                          GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-media-11-linux.jar                           GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-media-11-mac.jar                             GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-media-11-win.jar                             GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-swing-11-linux.jar                           GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-swing-11-mac.jar                             GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-swing-11-win.jar                             GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-web-11-linux.jar                             GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-web-11-mac.jar                               GPL-2-CP                                                                                                                      
extra/modules/ext/javafx-web-11-win.jar                               GPL-2-CP                                                                                                                      
matthias@athena:~/src/incubator-netbeans$ 

Netbeans 11 is not releasable in that state. Please ensure, that the files are not part of the distribution. GPL-2-CP is still not cleared by the ASF and thus we can't redistribute GPL-2-CP files

@matthiasblaesing
Copy link
Contributor

@dukescript please have a look at this. The next version of netbeans will not be releasable, if this is not resolved. This is opened as blocker issue: https://issues.apache.org/jira/browse/NETBEANS-1995

@lkishalmi
Copy link
Contributor

I guess part of this one (or the whole) shall be reverted and a new nb-javac like solution shall be integrated,

@matthiasblaesing
Copy link
Contributor

Maybe this is just a packaging problem. But I'm a bit disappointed, that @dukescript ignores this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants