Re:Virtual Threads Arrive in JDK 21, Ushering a New Era of C...
by afavour on Wednesday April 12, 2023 @06:29AM
(#35537481)
> m2 is just a cache, it has pretty much zero impact on whether your stuff will build
Well… the cache can be broken. I’m not a Java dev so have no horse in this race but “it’s just a cache” doesn’t mean “it can’t ever be a problem”
Re:Virtual Threads Arrive in JDK 21, Ushering a New Era of C...
by i386 on Wednesday April 12, 2023 @06:37AM
(#35537543)
Having worked with maven for about 15 years… it’s largely not a problem anymore. Unless you publish snapshots and depend on them.
Re:Virtual Threads Arrive in JDK 21, Ushering a New Era of C...
by hamburglar on Wednesday April 12, 2023 @07:26AM
(#35537932)
If “it’s just a cache,” you should never be able to fix a build problem by nuking your cache. But I frequently can.
Re:Virtual Threads Arrive in JDK 21, Ushering a New Era of C...
by i386 on Wednesday April 12, 2023 @08:20AM
(#35538472)
Might want to enable strict checksumming on. I think that’s still a thing. Or are you depending on release artifacts that change?
Re:Virtual Threads Arrive in JDK 21, Ushering a New Era of C...
by dkarl on Wednesday April 12, 2023 @09:26AM
(#35539275)
Depending on what is in your cache, Maven will satisfy dependencies differently. You can go out of your way to nail down your dependencies (analogous to a Javascript lock file) but it goes against the grain of how Maven is designed. Maven encourages pretty sloppy dependency resolution by default, and that's what you'll see if you look inside the artifacts you depend on.
There may be other issues as well, because this was an issue that affected Maven throughout my years of using it, in contrast to SBT, which in my experience had this issue much less often (though it definitely did from time to time.)
Re:Virtual Threads Arrive in JDK 21, Ushering a New Era of C...
by whoisthemachine on Wednesday April 12, 2023 @11:00AM
(#35540890)
Can probably happen like it can happen with any dependency management system - if you set wildcard versions (or no version at all?), different systems can have different versions of the dependency cached. Eventually this can lead to surprise build failures.
I have my own issues with Maven, but never in my 16 years doing Java have I done that. What the heck leads you to believe doing that may fix something at all? .m2 is just a cache, it has pretty much zero impact on whether your stuff will build unless you had installed things there that are not available on a configured repository or something similar, which would of course be your mistake not the tool's.