Issue
I have defined javafx dependencies in pom.xml, but downloaded are .jars with manifest only and .jars for my specific OS - Windows (see picture).
src="https://i.stack.imgur.com/c2e0H.png" alt="Downloaded dependencies" />
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>15.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>15.0.1</version>
</dependency>
How to download others?
What i am trying to achieve?
I am trying to create 3 packages, each with my .jar application and javafx library for specific operating system, that is why i want to download javafx libraries for remaining OS (Linux, Mac).
Solution
You can use the <classifier>
tag in your dependency
From the docs:
The classifier distinguishes artifacts that were built from the same POM but differ in content. It is some optional and arbitrary string that - if present - is appended to the artifact name just after the version number.
My pom for cross-platform JavaFX-Applications usually look like this:
<dependencies>
<!-- JavaFX - Windows -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>11</version>
<classifier>win</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11</version>
<classifier>win</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>11</version>
<classifier>win</classifier>
</dependency>
<!-- JavaFX - Linux -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>11</version>
<classifier>linux</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11</version>
<classifier>linux</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>11</version>
<classifier>linux</classifier>
</dependency>
<!-- JavaFX - Mac -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>11</version>
<classifier>mac</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11</version>
<classifier>mac</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>11</version>
<classifier>mac</classifier>
</dependency>
<!-- other dependencies -->
</dependencies>
Answered By - gkhaos
Answer Checked By - David Marino (JavaFixing Volunteer)