Maven clean, just to be sure

Anthony Goubard
1 min readAug 21, 2021

Do you recognize that? Changing 1% of a project and recompiling and retesting 100%

This doesn’t have to be a requirements, with Maven & Git the system can detect which sub-modules is not modified and has no modified dependencies. So the compiled code available in the artifactory could be re-used.

In Java the system can detect which class depends to another one. So only unit test using the modified classes are executed.

The reality is recompile and retest everything locally and on the CICD (Continuous Integration and Continuous Delivery). This could optimized, saving CPU and developers time.

https://incremental-build.io/

Photo by Fotis Fotopoulos on Unsplash

With incremental build is goal is to do (locally & on CICD) a Git diff with an already built branch to detect modified files, re-used the compiled files of the built branch whenever possible and execute the tests only when reaching the modified classes.

Advantages:
* Developers spend less time to start the application
* Developers are more likely to execute the tests before pushing the code
* Less CPU usage
* Code & bug fixes faster deployed to the different environments (test, acceptance, production)

Go to the website for more examples how to benefit from it and more details.

--

--

Anthony Goubard

Founder of Japplis, a company developing tools in Java in order to boost people productivity.