A Maven plugin to automatically generate versions for dev builds. https://rainnny.club
Go to file
2023-08-06 00:20:12 -04:00
src/main/java/me/braydon/plugin only parse parent commit if present 2023-08-06 00:20:12 -04:00
.gitignore Full impl 2023-08-03 06:43:38 -04:00
pom.xml Full impl 2023-08-03 06:43:38 -04:00
README.md Add output example to readme 2023-08-03 06:52:31 -04:00

maven-git-versioning

This plugin seamlessly converts standard "-SNAPSHOT" versions into a more descriptive format, " -dev-{gitDepth}-{gitHash}", allowing you to gain valuable insights into the exact commit from which each jar was built.

Usage

  1. Add the plugin to your pom.xml:
    <build>
        <plugins>
            <plugin>
                <groupId>me.braydon</groupId>
                <artifactId>git-versioning-maven-plugin</artifactId>
                <version>1.0</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>versioning</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    
    <pluginRepositories>
        <pluginRepository>
            <id>rainnny-repo-public</id>
            <url>https://maven.rainnny.club/public</url>
        </pluginRepository>
    </pluginRepositories>
    
  2. Build your project with mvn package (or mvn git-versioning:versioning if you just want to see data)

Output

Output Jar Example