You mean your build system is Gradle and you want to download some JARs from Maven Central? And currently, you are checking these JARs into the source repo (
src/main/jib), which you don't like, right? I think you can always dynamically download files during compilation (or any stage of the build that you deem suitable), like this
example? The directory doesn't have to be
src/main/jib if you
configure jib.extraDirectories, so you could copy the JAR into the Gradle build output directory (
build/...).
BTW, having files under some Jib extra directories won't affect the contents of a Spring Boot fat JAR. And note that Jib doesn't use a Spring Boot JAR or require creating it. Jib doesn't even run the Spring Boot plugin.