Any technique to override a version catalog versio...
# community-support
p
Any technique to override a version catalog version consumed from Nexus not local? I have a parent project with 25 modules/subprojects using a version catalog from a Nexus private repo. Now, around 10 modules depend on another internal library (published in other project). I want to test locally some changes I did in that library, I want to consume it from maven local. I can manually specify the dependency directly in each
build.gradle
file but I wonder if I could just do this with one loc, or so. Something like:
Copy code
catalog.override {
  When (this-package) use (the-other)
}
t
p
Wow 😲 how I could I miss that. Thank you so much 🙏
v
But be aware that Maven local is broken by design and if you really need to use it, at least use a content filter to only use exactly what you need from there. Your use-case though cries very loud "use composite build" though, at least if the projects use the same Gradle version or at least are compatible.
p
Yes all these projects are Gradle compatible and I do the composite builds setup when development involves this library. However, in this case, another project had actually done the changes in said library. I just want to make a smoke test on the final build using that specific compiled version. Without the need of cloning the full library into the project and such.
v
Without the need of cloning the full library into the project and such
If you have it somewhere on disk anyway, you don't need to re-clone it, just include it from where it is. But yeah, if you are aware of it, and of the problems with Maven Local, all is well. 🙂
👍 1
🙌 1