I've installed the Gradle Artifactory Plugin in my Spring Boot project and I want to deploy the FatJar produced by the bootRepackage
task to my Artifactory server. However I can't find a way to achieve it.
Here's my base configuration :
artifactory {
publish {
contextUrl = "https://my.artifacto.ry/artifactory/"
repository {
[...] //Credential
maven = true
}
defaults {
publications ('mavenJava')
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java // <--- I need to set the Spring Boot
// task result (fatjar) right there
}
}
}
I already used this configuration for publishing Jar only and it went straightforward every time. Does anybody knows how to configure it to publish Spring Boot fatjar instead of my classes only?
I had the same problem. Adding this code to a Gradle project configuration should do:
artifactoryPublish {
dependsOn bootRepackage
}
With that, bootRepackage
is run before artifactoryPublish
, so the JAR it takes and uploads should be the Spring Boot fat JAR.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments