https://github.com/invvk/auto-increment-plugin
Maven plugin that automatically increases the version number accordingly, it support commit hash too!
https://github.com/invvk/auto-increment-plugin
auto-version automation commit git java maven maven-central maven-plugin maven-plugins pom properties versioning yaml
Last synced: 5 months ago
JSON representation
Maven plugin that automatically increases the version number accordingly, it support commit hash too!
- Host: GitHub
- URL: https://github.com/invvk/auto-increment-plugin
- Owner: Invvk
- License: gpl-3.0
- Archived: true
- Created: 2021-08-09T16:04:07.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-09T19:06:19.000Z (almost 5 years ago)
- Last Synced: 2025-07-23T08:31:33.129Z (11 months ago)
- Topics: auto-version, automation, commit, git, java, maven, maven-central, maven-plugin, maven-plugins, pom, properties, versioning, yaml
- Language: Java
- Homepage:
- Size: 101 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# auto-increment-plugin
[](https://github.com/Invvk/auto-increment-plugin/actions/workflows/maven.yml) [](https://search.maven.org/search?q=g:%22io.github.invvk%22%20AND%20a:%22auto-increment-plugin%22)
Maven plugin that automatically increases the version number accordingly, it support commit hash too!
# How it works
This plugin works by generating a properties file saving three values:
- `Major`: Major version number **X**.0.0
- `Minor`: Minor version number 0.**X**.0
- `Patch`: Patch version number 0.0.**X**
everytime a `install` or `package` is initiated, the build number keep increasing.
as soon as the `Patch` hit the limit (`default is 9`) the `Minor` version increases by 1
and the same thing goes for minor, as soon as it hits the limit (`default is 9`), the `Major` version increases by 1
# Using this plugin
Using maven, you can now implement and use this plugin without the need for extra configuration
add this inside `` tag
```xml
io.github.invvk
auto-increment-plugin
1.1.2
modifyVersion
```
# Plugin compatibility with Java
Here is an overview of the current plugin compatibility with Java
| Plugin Version | Required Java Version |
| --------------- | ---------------------:|
| 1.0.X | Java 1.8 |
| 1.1.X | Java 1.8 |
# Common issues
- **Problem: Sometimes maven might not recognize the property `${aip.version.full}` and highlight it as an error.**
- **Solution:** don't worry, in the building process maven is going to recognize this property. you can suppress the error by adding this line on top of the property like in shown picture.

copy and paste: ``
- **Problem: Commit has isn't appearing in (`aip.git.commit.cut`) or in (`aip.version.full`)**
- **Solution:** Make sure that your project is linked up with a git repository and it contains `.git` directory. Also, Make sure that you don't have `disableGit` option enabled.
# Licenses
This project uses [GNU General Public License v3.0](https://github.com/Invvk/auto-increment-plugin/blob/main/LICENSE).
full artical on this license can be found [**here**](https://www.gnu.org/licenses/gpl-3.0.html).