3 ms·
It's not Java, it's lazy developers you hate. The same nightmares happened to me in the early 2000's with CPP and CORBA. You have to clean up the pom.xml's. Th
by exabrial 3y ago
It's not Java, it's lazy developers you hate. The same nightmares happened to me in the early 2000's with CPP and CORBA.
You have to clean up the pom.xml's. That is the only way. Remove ALL unused dependencies. Declare ALL used dependencies correctly: compile, runtime, provided, test. Delcare ALL used dependencies EVEN IF they're brought in transitively. This last point is so essential because the maven version algorithm relies on it.
In big companies, people have a terrible habit of just copy/pasting dependencies from one project to the next. Your pom _absolutely_ must be minimal and only import things you need, otherwise this happens.
One our checks fails the build if undeclared used dependencies are found, but also fails the build if unused dependencies are found. Developers that break these rules too often give an unfortunate meeting because it is this serious.
If these buildings blocks aren't correct, all of your efforts will fail. I used to work for a large Asian software company, that began with an A and ended in Ba. I helped rescue multiple giant codebases with this technique.