Package org.apache.polaris.version
Class PolarisVersion
java.lang.Object
org.apache.polaris.version.PolarisVersion
Utility class to retrieve the current Polaris version and the contents of the
NOTICE and
LICENSE* files.
If built as a release using the Gradle -Prelease project property, more information
like the Git tag, Git commit ID, build system and more is available as well.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the commit ID as in the jar manifest, if build-time Git information is available, when Polaris has been built with the Gradle-Preleaseproject property.Returns the output ofgit describe --tagsas in the jar manifest, if build-time Git information is available, when Polaris has been built with the Gradle-Preleaseproject property.Returns the Java version used during the build as in the jar manifest, if build-time Git information is available, when Polaris has been built with the Gradle-Preleaseproject property.Returns the version as in the jar manifest, if build-time Git information is available, when Polaris has been built with the Gradle-Preleaseproject property..Returns information about the system that performed the build, if build-time Git information is available, when Polaris has been built with the Gradle-Preleaseproject property.Returns the build timestamp as in the jar manifest, if build-time Git information is available, when Polaris has been built with the Gradle-Preleaseproject property.static booleanFlag whether the build is a released version, when Polaris has been built with the Gradle-Preleaseproject property.static StringThe version string as in the fileversion.txtin the project's root directory.static Stringstatic String
-
Method Details
-
polarisVersionString
The version string as in the fileversion.txtin the project's root directory. -
isReleaseBuild
public static boolean isReleaseBuild()Flag whether the build is a released version, when Polaris has been built with the Gradle-Preleaseproject property. Iftrue, thegetBuild*functions return meaningful values. -
getBuildReleasedVersion
Returns the version as in the jar manifest, if build-time Git information is available, when Polaris has been built with the Gradle-Preleaseproject property..Example values:
1.0.0-incubating-SNAPSHOT,1.0.0-incubating,1.0.0- See Also:
-
getBuildGitHead
Returns the commit ID as in the jar manifest, if build-time Git information is available, when Polaris has been built with the Gradle-Preleaseproject property.Example value:
d417725ec7c88c1ee8f940ffb2ce72aec7fb2a17- See Also:
-
getBuildGitTag
Returns the output ofgit describe --tagsas in the jar manifest, if build-time Git information is available, when Polaris has been built with the Gradle-Preleaseproject property.Example value:
apache-polaris-0.1.2- See Also:
-
getBuildJavaVersion
Returns the Java version used during the build as in the jar manifest, if build-time Git information is available, when Polaris has been built with the Gradle-Preleaseproject property.Example value:
21.0.5- See Also:
-
getBuildSystem
Returns information about the system that performed the build, if build-time Git information is available, when Polaris has been built with the Gradle-Preleaseproject property.Example value:
Linux myawesomehost 6.12.6 #81 SMP PREEMPT_DYNAMIC Fri Dec 20 09:22:38 CET 2024 x86_64 x86_64 x86_64 GNU/Linux- See Also:
-
getBuildTimestamp
Returns the build timestamp as in the jar manifest, if build-time Git information is available, when Polaris has been built with the Gradle-Preleaseproject property.Example value:
2024-12-16-11:54:05+01:00- See Also:
-
readNoticeFile
-
readSourceLicenseFile
-