I'm looking to fetch JavaFX from Maven Central using Ivy.
This works to get the Java dependencies, but not the native dependencies.
Expected:
javafx-graphics-21.0.1.jar
javafx-graphics-21.0.1-linux.jar
Actual:
javafx-graphics-21.0.1.jar
javafx-graphics-21.0.1-linux.jar
How do I also obtain the native components?
ivy.xml
<ivy-module version="2.0" xmlns:m="https://ant.apache.org/ivy/maven">
<info organisation="org.my" module="my-proj"/>
<dependencies>
<dependency org="org.openjfx" name="javafx-graphics" rev="21.0.1" />
</dependencies>
</ivy-module>
ivy && ls ~/.ivy2/cache/org.openjfx/javafx-graphics/jars
# javafx-graphics-21.0.1.jar
Here's the POM: https://repo1.maven.org/maven2/org/openjfx/javafx/20.0.1/javafx-20.0.1.pom
Related: How to make maven request the correct javafx dependancies on linux
I'm adding the maven-2
tag because Ivy uses the Maven 2 repositories:
With no specific settings, Ivy uses the Maven 2 repository to resolve the dependencies you declare in an Ivy file.
javafx.platform
value of the native components from the POM.ivy.xml
is configured to use the correct xmlns:m
.m:classifier="linux"
(or linux-aarch64
, mac-aarch64
, etc)..ivy2/cache
ivy.xml
<ivy-module version="2.0" xmlns:m="https://ant.apache.org/ivy/maven">
<info organisation="org.my" module="my-proj"/>
<dependencies>
<dependency org="org.openjfx" name="javafx-graphics" rev="21.0.1" />
<dependency org="org.openjfx" name="javafx-graphics" rev="21.0.1" m:classifier="linux"/>
</dependencies>
</ivy-module>
ls ~/.ivy2/cache/org.openjfx/javafx-graphics/jars
# javafx-graphics-21.0.1.jar
# javafx-graphics-21.0.1-linux.jar