I got a maven project with a main module and multiple submodule. I would like to know if there is a simple way to retrieve all the modules changed between two commits.
For what it worth, almost 3 years after the question:
I designed on a heuristic based on git diff, based on the fact that maven artifacts are ruled by convention.
git diff --name-status <commit1> <commit2>
Of course, this cannot handle changes such as a/b/c/README.md. Is it in a, a/b or a/b/c ?
I use this heuristic to list all modules to recompile for CI builds. If one of the files could not be classified by the above algorithm, I just rebuild the whole project.
Cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With