Gradle Version Catalog and JavaFX

Viewed 96

I am currently testing Version Catalog on a JavaFX project of mine. Therefore I need to update the dependencies and found something where I am stuck.

My dependencies are looking like this:

dependencies {
    implementation("org.openjfx:javafx-base:11.0.2:win")
    implementation("org.openjfx:javafx-fxml:11.0.2:win")
    implementation("org.openjfx:javafx-graphics:11.0.2:win")
    implementation("org.openjfx:javafx-controls:11.0.2:win")
    implementation("org.openjfx:javafx-web:11.0.2:win")
}

I've created a libs.versions.toml file to reference the dependencies later

[versions]
javafx-win = "11.0.2:win"

[libraries]
javafx-base-win = { module = "org.openjfx:javafx-base", version.ref = "javafx-win" }
javafx-controls-win = { module = "org.openjfx:javafx-controls", version.ref = "javafx-win" }
javafx-fxml-win = { module = "org.openjfx:javafx-fxml", version.ref = "javafx-win" }
javafx-graphics-win = { module = "org.openjfx:javafx-graphics", version.ref = "javafx-win" }
javafx-media-win = { module = "org.openjfx:javafx-media", version.ref = "javafx-win" }
javafx-web-win = { module = "org.openjfx:javafx-web", version.ref = "javafx-win" }


[bundles]
javafx-win = ["javafx-base-win", "javafx-controls-win", "javafx-fxml-win", "javafx-graphics-win",
  "javafx-media-win", "javafx-web-win"]

The problem that occurs now is that the depdendencies could not be found e.g.

dependencies {
   implementation(libs.bundles.javafx.win)
}
> Could not find org.openjfx:javafx-base:11.0.2-win.
        Searched in the following locations:
          - https://repo.maven.apache.org/maven2/org/openjfx/javafx-base/11.0.2-win/javafx-base-11.0.2-win.pom
        If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
        Required by:
            project :

404 Not Found to the website: https://repo.maven.apache.org/maven2/org/openjfx/javafx-base/11.0.2-win/javafx-base-11.0.2-win.pom

Probably this path should be correct: https://repo.maven.apache.org/maven2/org/openjfx/javafx-base/11.0.2/

I would appreciate the help how I should configure the tomlfile.

Thanks in advance!

0 Answers
Related