'Gradle project dependency problems
I have a multi-project Gradle build that is configured as this:
keycloak
|-- keycloak-spi-1
|-- keycloak-spi-2
|-- keycloak-theme
the subprojects build jars that i want to include inside docker that is build in the parent with Jib but, an error message appears: Obtaining project build output files failed
Gradle is version 7.4.1
Thanks
After some investigation, Jib use the output of jar task during the image build and, in this case, jar task must not compile sources but copy the shadowJars from all the subprojects. I take this approach but not work:
task jar(type: Jar, overwrite: true) {
subprojects {
from(tasks.shadowJar)
}
into "${buildDir}/libs"
doLast {
delete jar.archiveFile
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|