Skip to content

Commit ce41a13

Browse files
authored
Add build date to version number (#303)
This helps identify, if the running version is the intended one at single glance. E.g. untagged commit hashes that have been built a long time ago might not be the intended one. Or development versions with old build date might not be the intended ones. Example output: With tag 1.0.0 (abc123, 2025-09-10 17:15) or without tag abc123, 2025-09-10 17:15
1 parent ce1792a commit ce41a13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424

2525
<!--suppress UnresolvedMavenProperty -->
2626
<!-- git is provided by git-commit-id-maven-plugin -->
27-
<versionName>${git.tags} (${git.commit.id.abbrev})\n${project.licenses[0].comments}\n${project.licenses[0].name}\n${project.licenses[0].url}</versionName>
27+
<versionName>${git.tags} (${git.commit.id.abbrev}, ${maven.build.timestamp})\n${project.licenses[0].comments}\n${project.licenses[0].name}\n${project.licenses[0].url}</versionName>
28+
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
2829

2930
<versionNameVersion>2.2.0</versionNameVersion>
3031
<mockitoVersion>4.8.0</mockitoVersion>

0 commit comments

Comments
 (0)