Vaclav Kosar's face photo
Vaclav Kosar
Software, Machine Learning, & Business

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

Incrementally build only those modules that changed compared to a reference Git branch and all their dependents with this open-source Maven plugin.

An example of a multi-module project Eclipse JDT

We had issues with our Maven 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. 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.

Let's connect





Privacy Policy How many days left in this quarter? Twitter Bullet Points to Copy & Paste