public final class Version
extends java.lang.Object
This class retrieves the version information from
META-INF/com.linecorp.armeria.versions.properties
, which is generated in build time. Note that
it may not be possible to retrieve the information completely, depending on your environment, such as
the specified ClassLoader
, the current SecurityManager
.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
artifactId() |
java.lang.String |
artifactVersion() |
long |
buildTimeMillis() |
long |
commitTimeMillis() |
static java.util.Map<java.lang.String,Version> |
identify()
Retrieves the version information of Armeria artifacts using the current
context class loader.
|
static java.util.Map<java.lang.String,Version> |
identify(java.lang.ClassLoader classLoader)
Retrieves the version information of Armeria artifacts using the specified
ClassLoader . |
boolean |
isClean()
Returns true if repository status is not dirty.
|
java.lang.String |
longCommitHash() |
java.lang.String |
repositoryStatus() |
java.lang.String |
shortCommitHash() |
java.lang.String |
toString() |
public static java.util.Map<java.lang.String,Version> identify()
Map
whose keys are Maven artifact IDs and whose values are Version
spublic static java.util.Map<java.lang.String,Version> identify(java.lang.ClassLoader classLoader)
ClassLoader
.Map
whose keys are Maven artifact IDs and whose values are Version
spublic java.lang.String artifactId()
public java.lang.String artifactVersion()
public long buildTimeMillis()
public long commitTimeMillis()
public java.lang.String shortCommitHash()
public java.lang.String longCommitHash()
public java.lang.String repositoryStatus()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isClean()