Nova Ordis Utilities Version Metadata Handling: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 20: Line 20:


=Build Infrastructure Configuration=
=Build Infrastructure Configuration=
<font color=red>
* Verify that the POM file contains the definition of <tt>maven.build.timestamp.format</tt> and <tt>release_date</tt>, as required by [[project Version and Release Date#Define_maven.build.timestamp.format_and_release_date]]. If it does not, inject it.
</font>

Revision as of 18:08, 16 November 2016

Internal

Overview

The mechanism relies on the presence of a "VERSION" metadata file in the application's classpath.

VersionUtilities.getVersion() and VersionUtilities.getReleaseDate() can be used as top-level API to locate, process and display the metadata.

In case the metadata file is not found, the both methods log the condition using SLF4J warn() and return null.

In order to insure that the artifacts are built to contain version metadata, follow the instructions provided in the "Build Infrastructure Configuration" section, below.

Code

https://github.com/NovaOrdis/novaordis-utilities/blob/master/src/main/java/io/novaordis/utilities/version/VersionUtilities.java

Build Infrastructure Configuration