Maven plugin that automatically increases the version number accordingly, it support commit hash too!
This plugin works by generating a properties file saving three values:
Major: Major version number X.0.0Minor: Minor version number 0.X.0Patch: 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 maven, you can now implement and use this plugin without the need for extra configuration
add this inside <build> tag
<plugin>
<groupId>io.github.invvk</groupId>
<artifactId>auto-increment-plugin</artifactId>
<version>1.1.2</version>
<executions>
<execution>
<goals>
<goal>modifyVersion</goal>
</goals>
</execution>
</executions>
</plugin>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 |
-
Problem: Sometimes maven might not recognize the property
${aip.version.full}and highlight it as an error. -
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
.gitdirectory. Also, Make sure that you don't havedisableGitoption enabled.
- Solution: Make sure that your project is linked up with a git repository and it contains
This project uses GNU General Public License v3.0. full artical on this license can be found here.
