Package com.linecorp.armeria.common.util
Class Version
java.lang.Object
com.linecorp.armeria.common.util.Version
Retrieves the version information of available Armeria artifacts.
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
.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the Maven artifact ID of the component, such as"armeria-grpc"
.Returns the Maven artifact version of the component, such as"1.0.0"
.long
Returns when the release commit was created.static Version
Returns the version information for the Armeria artifact namedartifactId
.static Version
get
(String artifactId, ClassLoader classLoader) Returns the version information for the Armeria artifact namedartifactId
using the specifiedClassLoader
.getAll()
Retrieves the version information of Armeria artifacts.getAll
(ClassLoader classLoader) Retrieves the version information of Armeria artifacts using the specifiedClassLoader
.boolean
Returns whether the repository was clean when performing the release process.Returns the long hash of the release commit.Returns the status of the repository when performing the release process.Returns the short hash of the release commit.toString()
-
Method Details
-
get
Returns the version information for the Armeria artifact namedartifactId
. If information for the artifact can't be found, a default value is returned with arbitraryunknown
values. -
get
Returns the version information for the Armeria artifact namedartifactId
using the specifiedClassLoader
. If information for the artifact can't be found, a default value is returned with arbitraryunknown
values. -
getAll
Retrieves the version information of Armeria artifacts. This method is a shortcut forgetAll(Version.class.getClassLoader())
. -
getAll
Retrieves the version information of Armeria artifacts using the specifiedClassLoader
. -
artifactId
Returns the Maven artifact ID of the component, such as"armeria-grpc"
. -
artifactVersion
Returns the Maven artifact version of the component, such as"1.0.0"
. -
commitTimeMillis
public long commitTimeMillis()Returns when the release commit was created. -
shortCommitHash
Returns the short hash of the release commit. -
longCommitHash
Returns the long hash of the release commit. -
repositoryStatus
Returns the status of the repository when performing the release process.- Returns:
"clean"
if the repository was clean."dirty"
otherwise.
-
isRepositoryClean
public boolean isRepositoryClean()Returns whether the repository was clean when performing the release process. This method is a shortcut for"clean".equals(repositoryStatus())
. -
toString
-