2 ms·
Maven, Gradle and the like always download dependencies as part of the build, and if a server is down (or flaky like jitpack) good lord is it annoying. What I
by AtlasBarfed 5y ago
Maven, Gradle and the like always download dependencies as part of the build, and if a server is down (or flaky like jitpack) good lord is it annoying.
What I don't understand is why dependency download isn't a separate task you do before compilation. FIRST you download all the dependencies to stabilize that, then you build the code. The reproducibility is the big one.
IT drives me nuts that the dependencies are hidden away in maven and gradle. I have to lookup obscure "download dependencies to a lib" task configuration. Still the obsession with massive jars/wars/whatever when all you should have to update in a deploy is the difference in the libs and the main code jar.
The reason for this obscurement is pretty much "uh, it saves disk space?" which is a laughable consideration given the bloat in war files, docker images, and the like.
I agree with the poster.
- gravypod 5y ago> What I don't understand is why dependency download isn't a separate task you do before compilation. FIRST you download all the dependencies to stabilize that, then you build the code. This is what bazel does. It also offers a `bazel fetch` to pre-download things before going offline (ex: flight).
- oftenwrong 5y agoFor Maven, you can use this plugin to move downloading dependencies into a separate step: https://github.com/qaware/go-offline-maven-plugin https://github.com/qaware/go-offline-maven-plugin It's not perfect, but it can be useful.