We had issues with our builds taking too long on a project with messaging microservice architecture. After we adopted git feature branch model called GitFlow and setting up pre-merge testing policy, it dawned on me that by having develop branch stability guarantee, we could speed up our builds.
Reason for ability to speed up was that most build time was spent by unit testing and most feature branches introduced changes into only a few maven modules. Thus since prior test stability was guaranteed, we could simply test only modules which were affected by introduced changes on given feature branch.
I was able to improve our build time implementing gitflow-incremental-builder. You can use it too, it is a permissive open-source plugin. From above, it is apparent that I needed access to diff develop-feature and to maven module dependency structure. Former was achieved using JGit and later using Maven Extension mechanism.
In this project I used a modern Guice dependency injection for Maven Plugins.
Update 2022-04-03
Gitflow-incremental-builder is being developed beyond by phenomenal dev Falko. The project used Boundary Control Entity Architecture.