Issue
I'm currently working on a Openjfx project (for windows) using maven, so I have in my POM:
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>12.0.2</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>12.0.2</version>
</dependency>
With the pandemics I had to travel and I'm stuck in another city with only my macbook.
I was asked to make some changes in the project. And now I want to generate the jar with the windows dependencies but maven downloads only the mac version.
javafx-controls-12.0.2-mac.jar
javafx-graphics-12.0.2-mac.jar
javafx-base-12.0.2-mac.jar
javafx-fxml-12.0.2-mac.jar
Is there a way to force the download of the win version of the files in mac?
PS: I'm also using Apache Maven Shade plugin for packing the Openjfx files in the jar.
Solution
Just found that you can specify what platforms to download the jars to make it cross platform as follows (according to https://openjfx.io/openjfx-docs/#modular):
<dependencies>
...
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>12</version>
<classifier>win</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>12</version>
<classifier>linux</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>12</version>
<classifier>mac</classifier>
</dependency>
</dependencies>
Answered By - Kurt Naimaier