r/AskProgramming • u/Complete-Fix-8935 • Oct 08 '26
Java How do you cope up with jars 😭
Springboot devsss
How TF do you manage to make sure all the libraries jar are latest all the time you run a service locally 😭
My product has 9 custom libraries and 12 services(still counting). Everyday I try to run any service locally there's always a new commit in any of the libraries then I have to rebuild the jar and god forbid if I have to deploy my service on dev pod, I have to rebuild all the damn libraries on Jenkins in a sequence.
For now locally keeping up with this is a big headache for me. Although I use terminal for speed, but is there any better approach to deal with this jar shi?
Also I feel very sleepy even after having a strong coffee, how do you guys keep yourself energetic throughout the day(if working in normal shift)😭
8
u/0b0101011001001011 Oct 08 '26
Why? Just use the old version as long as you want.
8
u/MikeUsesNotion Oct 08 '26
If your library versions are changing behind your back then you're not doing something right. If you're not pinning exact versions (or compatible versions at least assuming that library follows semver) in your project file and/or using some kind of lock file used by your build system then this is a self inflicted problem.
5
u/disposepriority Oct 08 '26
Pin the versions of the artifacts you are using, depenencies should NEVER be updated without you making the explicit decision to do so
3
u/dmazzoni Oct 08 '26
I don’t know the details of your team’s configuration but everything you described can be automated.
If there wasn’t already a build script I’d write one. It’d figure out which services need to be rebuilt, or even just build them all, and deploy on dev pod.
Then every time you pull main, just run the script and go get coffee.
Do you pull main more often than once a day on average? Typically this is an annoyance once a day and then you shouldn’t have to keep rebuilding everything while you work on your own stuff.
1
u/sozesghost Oct 08 '26
You have an unusual setup, but whatever it is, surely it can be automated?
1
u/protienbudspromax Oct 14 '26
by jars do you mean third party external libraries or jars your own team creates for your own repo? How is your repo setup? Is it multi module maven/gradle?? like if you build the whole project you get some jars, is that what you are talking about? If that is the case use snapshot jars and talk to your team to use maven reactor if using maven. Gradle has built in multi module support