GitFlow Incremental Builder - Speed up your multi-module Maven build

Build only modules that changed compared to the master branch, plus their dependents. Java!
An example of a multi-module project Eclipse JDT
An example of a multi-module project Eclipse JDT

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.

Created on 03 Jul 2016.
Thank you

About Vaclav Kosar How many days left in this quarter? Twitter Bullet Points to Copy & Paste Averaging Stopwatch Privacy Policy
Copyright © Vaclav Kosar. All rights reserved. Not investment, financial, medical, or any other advice. No guarantee of information accuracy.