Source code uses Java 11 for development, however the API compatibility is restricted to Java 8. This allows us to use the syntactical sugar advancements such as var, switch etc but still support Java 8 projects. This is achieved with the use of Jabel - javac compiler plugin.
-
Development dependency: Java 11
-
Runtime dependency: Java 8+
|
Using Java 9+ APIs will result in compilation failure. See how and why Jabel works for more details. |
GitHub Actions workflow is configured to use this same extension to version the project and then use JReleaser to release this to Maven Central.
To trigger the release:
Install the latest extension to local repository -
./mvnw install
Commit using one of the Version Commit goals -
./mvnw com.github.manikmagar:git-versioner-maven-plugin:V-LATEST-SNAPSHOT:commit-patch --non-recursive
./mvnw com.github.manikmagar:git-versioner-maven-plugin:V-LATEST-SNAPSHOT:commit-minor --non-recursive
Verify the new version by running plugin’s print
goal -
./mvnw com.github.manikmagar:git-versioner-maven-plugin:V-LATEST-SNAPSHOT:print --non-recursive
In the output, you can look for version -
...
[INFO] --- git-versioner-maven-plugin:V-LATEST-SNAPSHOT:print (default-cli) @ git-versioner-maven-parent ---
[INFO] VersionPatternStrategy [branch: main, version: 0.6.0, hash: 238bedfdff4e84f7c3964a494b91a76c4998287f]
....
Tag the new version by running plugin’s tag
goal -
./mvnw com.github.manikmagar:git-versioner-maven-plugin:V-LATEST-SNAPSHOT:tag --non-recursive
This should create a tag with current verison.
[INFO]
[INFO] --- git-versioner-maven-plugin:V-LATEST-SNAPSHOT:tag (default-cli) @ git-versioner-maven-parent ---
[INFO] Current Version: 0.6.0
[INFO] Tag Version 'v0.6.0' with message 'Release version 0.6.0'
[INFO] Created tag: 'refs/tags/v0.6.0@c95da362ef54a682f45b0a723aea609b3e980247'
[INFO] ------------------------------------------------------------------------
Push the release commit and tag
# push branch commit
git push
tagName=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
# push the new tag
# example - git push origin v0.6.0
git push origin v$tagName
Monitor GitHub Actions Workflows for release.
Once the pipeline succeeds, the new release should soon be available on