I’ve made a small multi-project gradle build to upload JavaFX runtimes for Windows, Linux and Mac to our internal Artifactory repo. It is a simeple thing hard-coded to grab the windows files from my JavaFX Runtime install and the Linux and Mac files from folders on the same machien where I have unzipped the JAvaFX download available for those platforms. The project is split into a root project with no artifact and two sub-projects. One that references the jfxrt.jar for each platform and makes an “archive” of it with appropriate classifiers to denote the target platform (with an artifactId of “jfxrt”), another sub-project that makes a zip of the native code, one for each platform, and gives them classifiers for each platform and CPU architecture. When the project runs I can see in the “build” folder of the sub projects that a “pom-default.xml” file has been created, but that file does not get uploaded, even thou all the archives do. I can’t figure out why.
Here’s what my project looks like:
jfxrt/the root build.gradle file contains the following:settings.gradle
build.gradle
jfxrt/
build.gradle
jfxrt-native/
build.gradle
defaultTasks 'upload'
version = "2.1.0.12"
dependsOnChildren()
configurations {
deployerJars
}
dependencies {
deployerJars "org.apache.maven.wagon:wagon-http:1.0-beta-2"
}
subprojects {
apply plugin: 'maven'
groupId = "javafx"
artfactBaseName = "jfxrt"
uploadArchives {
repositories {
mavenDeployer {
repository(url: "http://dcm-maven-repo/ext-release-local/")
pom.groupId = project.groupId
}
}
}
}
The jfxrt/build.gradle file contains:
def windowsJar = file("C:\Program Files (x86)\Oracle\JavaFX 2.1 Runtime\lib\jfxrt.jar")
def linuxJar = file("C:\Users\scott.palmer\Downloads\javafx-sdk${rootProject.version}-beta-linux\rt\lib\jfxrt.jar")
def macJar = file("C:\Users\scott.palmer\Downloads\javafx-sdk${rootProject.version}-beta-mac\rt\lib\jfxrt.jar")
artifacts {
archives(windowsJar) {
name project.artfactBaseName
version rootProject.version
classifier = 'windows'
type 'jar'
}
archives(linuxJar) {
name project.artfactBaseName
version rootProject.version
classifier = 'linux'
type 'jar'
}
archives(macJar) {
name project.artfactBaseName
version rootProject.version
classifier = 'mac'
type 'jar'
}
}
and finally the jfxrt-native/build.gradle file contains:
version rootProject.version
task windowsNativeZip(type: Zip) {
baseName = project.artfactBaseName+"-native"
classifier = "windows-x86"
version = rootProject.version
from("C:\Program Files (x86)\Oracle\JavaFX 2.1 Runtime\bin")
include("*.dll")
include("*.exe")
}
task linuxNativeZip(type: Zip) {
baseName = project.artfactBaseName+"-native"
classifier = "linux-x86"
version = rootProject.version
from("C:\Users\scott.palmer\Downloads\javafx-sdk${rootProject.version}-beta-linux\rt\lib\i386")
include("*.so")
}
task macNativeZip(type: Zip) {
baseName = project.artfactBaseName+"-native"
classifier = "mac-x86_64"
version = rootProject.version
from("C:\Users\scott.palmer\Downloads\javafx-sdk${rootProject.version}-beta-mac\rt\lib")
include("*.dylib")
}
artifacts {
archives windowsNativeZip
archives linuxNativeZip
archives macNativeZip
}
All of the jars/zips upload properly, but no pom is uploaded for either artifact (jfxrt or jfxrt-native). In the sub-projects after a build
jfxrt/build/pom-default.xml
and
jfxrt-native/build/pom-default.xml both exist. The contents appears to be reasonable.
Could somebody point me in the right direction?
the same name is used to define it and reference it, so that isn’t likely an issue.