public final class VersionInfo extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_BUILD_ON
Manifest key for the date in ms when the package was build.
|
static String |
KEY_IMPLEMENTATION_BUILD
Manifest key for codebase packageVersion (usually git hash or svn id).
|
static String |
KEY_IMPLEMENTATION_TITLE
Manifest key for name of the Lib/app in the jar (usually maven name tag value).
|
static String |
KEY_IMPLEMENTATION_VERSION
Manifest key for VersionInfo of the code (usually matches Mvn packageVersion)
|
static String |
MANIFEST_PATH
Manifest Default Path
|
static String |
SPRING_PATH
The path for classes loaded from a Spring Boot JAR file
|
static String |
WAR_PATH
The path for classes loaded from a WAR file
|
| Modifier and Type | Method and Description |
|---|---|
String |
getJavaVendor() |
String |
getJavaVersion() |
String |
getJavaVm() |
String |
getOsArch() |
String |
getOsName() |
String |
getOsVersion() |
String |
getPackageBuild() |
String |
getPackageBuildDate() |
String |
getPackageName() |
String |
getPackageVersion() |
static VersionInfo |
getVersion(Class clazz)
Gets the current VersionInfo base on a Class that will load it's manifest file.
|
static VersionInfo |
getVersion(Manifest manifest)
Gets the current VersionInfo based on Manifest & current JVM information.
|
String |
toString() |
public static final String KEY_BUILD_ON
public static final String KEY_IMPLEMENTATION_TITLE
public static final String KEY_IMPLEMENTATION_VERSION
public static final String KEY_IMPLEMENTATION_BUILD
public static final String MANIFEST_PATH
public static final String WAR_PATH
public static final String SPRING_PATH
public static VersionInfo getVersion(Manifest manifest)
manifest - Manifest were to get the information.public static VersionInfo getVersion(Class clazz) throws IOException
clazz - Class that will load the manifest MF fileVersionInfo pojo with the information.IOException - If Unable to read the Manifest file.public String getPackageName()
public String getPackageVersion()
public String getPackageBuild()
public String getPackageBuildDate()
public String getJavaVersion()
public String getJavaVendor()
public String getJavaVm()
public String getOsName()
public String getOsVersion()
public String getOsArch()
Copyright © 2021 CrafterCMS. All rights reserved.