In a Maven multi-module project using GIT, this extension only builds modules that changed or impacted by the changes.
Maven pom.xml
:
<build>
<extensions>
<extension>
<groupId>com.ikelin</groupId>
<artifactId>incremental-builds</artifactId>
<version>{VERSION}</version>
</extension>
</extensions>
</build>
Maven command:
mvn package -Dincremental.enable=true
This enables the extension and builds modules that changed between the current branch, including uncommitted files and untraced files, and the master branch.
To compare current branch against another commit, branch, or tag:
mvn package -Dincremental.enable=true -Dincremental.commit=5a6e149
mvn package -Dincremental.enable=true -Dincremental.branch=staging
mvn package -Dincremental.enable=true -Dincremental.tag=1.0.2
Note that Maven options -pl
or --projects
will override this extension's changed modules list.