Issue
This is my first attempt at implementing JavaFX using Gradle. My build never completes, getting the following error:
Plugin [id: 'org.openjfx.javafxplugin', version: '0.0.9'] was not found in any of the following resources
I've been out to the Maven repositories we use internally here and have found the JavaFX plugin, albeit with just a pom file, no jar or other executable code. Here is my Gradle set up.
plugins {
id 'java-library'
id 'maven'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.9'
}
apply plugin: 'org.springframework.boot'
apply plugin: 'java'
sourceCompatibility = 11.0
targetCompatibility = 11.0
javafx {
version = '15.0.1'
modules = ['javafx.fxml', 'javafx.controls', 'javafx.graphics']
}
repositories {
mavenLocal()
maven {
url "https://local.repository.1/content/groups/public-maven"
}
maven {
url "https://local.repository.2/content/groups/public-maven"
}
maven {
url "https://local.repository.3/service/local/repositories/onewaymirror/content"
}
maven {
url "https://local.repository.4/content/groups/public_maven_release_snapshots_dev/"
}
}
dependencies {
implementation "org.openjfx:javafx-plugin:0.0.9"
testImplementation group: 'junit', name: 'junit', version '4.12'
}
Any assistance you can provide would be greatly appreciated. Thanks in advance.
Edit: It seems that even if I comment out the JavaFX plugin and the JavaFX section of the script, other parts of the build get the same "not found" condition with other dependencies that I know are in the repositories. This seems to be a generalized Gradle issue, not specific to JavaFX.
Solution
The following added to settings.gradle got me past the problem:
pluginManagement {
repositories {
maven {
url "https://local.repository1/content/groups/public-maven.dev/"
}
}
}
Thanks to all who replied and helped.
Answered By - VultureMF
Answer Checked By - Cary Denson (JavaFixing Admin)