This is an automated email from the ASF dual-hosted git repository. matthiasblaesing pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push: new 4aacfa67c1 On JDKs without JavaFX/OpenFX libs.javafx has unsatisfiable package dependency new 06d047deb2 Merge pull request #6010 from matthiasblaesing/javafx_fix 4aacfa67c1 is described below commit 4aacfa67c1065762cde3d6de877e1b96b00efd96 Author: Matthias Bläsing <mblaes...@doppel-helix.eu> AuthorDate: Thu Jun 1 19:22:41 2023 +0200 On JDKs without JavaFX/OpenFX libs.javafx has unsatisfiable package dependency With this commit: commit 15811ec850cc3cfe50eeaffd96c2eae1065ccb9c Author: Svata Dedic <svatopluk.de...@oracle.com> Date: Tue Apr 18 14:10:14 2023 +0200 Allow java and (system) package dependencies for eager modules. Provider autoloads with failed dependencies have problems reported. dependency checking was improved and in turn module configurations that worked by luck failed to load. For libs.javafx the situation is trivial on JDKs that bundle JavaFX/OpenJFX. In these cases the JDK provides the OpenJFX classes, which is detected by the module system and the token org.openide.modules.jre.JavaFX is automatically provded. On other JDKs OpenJFX is loaded from a set of org.netbeans.libs.javafx.<PLATFORM> modules onto the classpath and these modules provide the mentioned token. Before this change libs.javafx had this manifest entry: OpenIDE-Module-Package-Dependencies: javafx.application[Application] With the improved checking this requirement fails on JDK not bundling JavaFX/OpenJFX. For these cases both the fragement host org.netbeans.libs.javafx and one of the provider modules, for example org.netbeans.libs.javafx.linux would need to be loaded together to be able to satisfy the dependency. This PR removed the package dependency as it provides no additonal value, as the presence of the token org.openide.modules.jre.JavaFX reports presense of native support. Closes: #6004 --- platform/libs.javafx/manifest.mf | 3 +- platform/libs.javafx/nbproject/project.xml | 14 ----- .../org/netbeans/libs/javafx/IsFXEnabledTest.java | 61 ---------------------- 3 files changed, 1 insertion(+), 77 deletions(-) diff --git a/platform/libs.javafx/manifest.mf b/platform/libs.javafx/manifest.mf index 03feba6316..0c6cadfbff 100644 --- a/platform/libs.javafx/manifest.mf +++ b/platform/libs.javafx/manifest.mf @@ -1,6 +1,5 @@ Manifest-Version: 1.0 OpenIDE-Module: org.netbeans.libs.javafx -OpenIDE-Module-Package-Dependencies: javafx.application[Application] OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/javafx/Bundle.properties OpenIDE-Module-Specification-Version: 2.28 OpenIDE-Module-Needs: org.openide.modules.jre.JavaFX @@ -38,4 +37,4 @@ OpenIDE-Module-Provides: javafx.animation, javafx.util, javafx.util.converter, netscape.javascript -Class-Path: %24%7Bjava.home%7D/lib/ext/jfxrt.jar +Class-Path: %24%7Bjava.home%7D/lib/ext/jfxrt.jar \ No newline at end of file diff --git a/platform/libs.javafx/nbproject/project.xml b/platform/libs.javafx/nbproject/project.xml index e2313422b9..e745496636 100644 --- a/platform/libs.javafx/nbproject/project.xml +++ b/platform/libs.javafx/nbproject/project.xml @@ -42,20 +42,6 @@ </run-dependency> </dependency> </module-dependencies> - <test-dependencies> - <test-type> - <name>unit</name> - <test-dependency> - <code-name-base>org.netbeans.libs.junit4</code-name-base> - <compile-dependency/> - </test-dependency> - <test-dependency> - <code-name-base>org.netbeans.modules.nbjunit</code-name-base> - <recursive/> - <compile-dependency/> - </test-dependency> - </test-type> - </test-dependencies> <public-packages> <package>javafx.animation</package> <package>javafx.application</package> diff --git a/platform/libs.javafx/test/unit/src/org/netbeans/libs/javafx/IsFXEnabledTest.java b/platform/libs.javafx/test/unit/src/org/netbeans/libs/javafx/IsFXEnabledTest.java deleted file mode 100644 index c9301d9196..0000000000 --- a/platform/libs.javafx/test/unit/src/org/netbeans/libs/javafx/IsFXEnabledTest.java +++ /dev/null @@ -1,61 +0,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. - */ - -package org.netbeans.libs.javafx; - -import javafx.embed.swing.JFXPanel; -import junit.framework.Test; -import org.netbeans.junit.NbModuleSuite; -import org.netbeans.junit.NbTestCase; -import org.openide.modules.ModuleInfo; -import org.openide.util.Lookup; - -/** - * - * @author Jaroslav Tulach <jtul...@netbeans.org> - */ -public class IsFXEnabledTest extends NbTestCase { - - public IsFXEnabledTest(String name) { - super(name); - } - - public static Test suite() { - return NbModuleSuite.emptyConfiguration().addTest(IsFXEnabledTest.class). - gui(false). - suite(); - } - - public void testIsFxModuleEnabled() throws Exception { - try { - JFXPanel p = new JFXPanel(); - } catch (RuntimeException | LinkageError err) { - return; - } - for (ModuleInfo mi : Lookup.getDefault().lookupAll(ModuleInfo.class)) { - if (mi.getCodeNameBase().equals("org.netbeans.libs.javafx")) { - assertTrue("Enabled", mi.isEnabled()); - Class app = mi.getClassLoader().loadClass("javafx.application.Application"); - assertNotNull("FX class loaded OK", app); - return; - } - } - fail("libs.javafx not found!"); - } -} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists