Question
maven dependency not found with Java FX 19 on Eclipse 2024-06 but not earlier
I have the following issue with Eclipse 2024-06
: A project that references
<dependencies>
<!-- Java FX -->
<!-- https://mvnrepository.com/artifact/org.openjfx/javafx-base -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<version>19</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>19</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-swing</artifactId>
<version>19</version>
</dependency>
</dependencies>
in its pom.xml
shows the error org.openfx:javafx-base:jar:${javafx.platform}:19 was not found in https://repo1.maven.org/maven2
.
This error is not there in earlier versions of Eclipse (e.g., Eclipse 2024-03).
How can I work on Java 11/17 Projects that reference JavaFX 11/19 in the latest version of Eclipse?
Notes:
The error also exists if you have a project that references a dependency that references JavaFX. So upgrading JavaFX is not (always) an option, if you need to work with some given dependency.
The error also comes up if you set the
<version>
to22
, but it is gone if you set the<version>
to `23-ea+22The property
${javafx.platform}
is not defined in the projects pom.xml but Eclipse shows that the property is defined withDefault Value: mac
.