A simple Maven plugin to bump your project version just like npm version patch|minor|major.
It updates the version in your root and submodule POMs, commits the change, and tags it in Git.
- Increment patch, minor, or major version
- Handles multi-module projects (updates child POMs)
- Creates a Git commit and tag for the new version
Add the plugin to your build:
<build>
<plugins>
<plugin>
<groupId>com.davidecaroselli</groupId>
<artifactId>bump-maven-plugin</artifactId>
<version>1.0.0</version>
</plugin>
</plugins>
</build>Then run one of the following commands:
# bump patch version (1.2.3 → 1.2.4)
mvn version:patch
# bump minor version (1.2.3 → 1.3.0)
mvn version:minor
# bump major version (1.2.3 → 2.0.0)
mvn version:majorThis will:
- update
pom.xml(including submodules) - commit the change (
vX.Y.Z) - create a Git tag (
vX.Y.Z)
The plugin is available from Maven Central. You can use it directly without extra setup:
mvn com.davidecaroselli:bump-maven-plugin:1.0.0:patchor via the short alias:
mvn version:patch- Java 8+
- Maven 3.8+
Licensed under the Apache 2.0 License.