I have a parent project that has multiple sub modules.
Whenever I run mvn package -DskipTests
at the project root, some submodule breaks on not finding tools.jar in the JDK directory (Mac OS Big Sur).
After some research, I found this thread that asks to put an exclusion in the dependency that's expecting tools.jar. I fixed some modules with this solution but it isn't very scalable. My submodules have several dependencies and I have to put exclusion in all of them and build, then undo some exclusions and build again to find out which exact dependency is expecting tools.jar. I have tried running mvn dependency:tree
to find out but even that fails on the same unable to find tools.jar error. Is there a simpler way to do this?
Thanks!