public class BrooklynVersion extends java.lang.Object implements BrooklynVersionService
Also retrieves the SHA-1 from any OSGi bundle, and checks that the maven and osgi versions match.
Modifier and Type | Class and Description |
---|---|
static class |
BrooklynVersion.BrooklynFeature |
Modifier and Type | Field and Description |
---|---|
static BrooklynVersion |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
void |
checkVersions() |
static java.lang.String |
get() |
static java.lang.Iterable<BrooklynVersion.BrooklynFeature> |
getFeatures(ManagementContext mgmt) |
static BrooklynVersion |
getInstance() |
static java.lang.String |
getOsgiVersion() |
java.lang.String |
getSha1FromOsgiManifest()
SHA1 of the last commit to brooklyn at the time this build was made.
|
java.lang.String |
getVersion() |
java.lang.String |
getVersionFromMavenProperties() |
java.lang.String |
getVersionFromOsgiManifest() |
static boolean |
isDevelopmentEnvironment()
Returns whether this is a Brooklyn dev environment,
specifically core/target/classes/ is on the classpath for the org.apache.brooklyn.core project.
|
boolean |
isSnapshot() |
void |
logSummary() |
public static final BrooklynVersion INSTANCE
public void checkVersions()
checkVersions
in interface BrooklynVersionService
@Nullable public java.lang.String getVersionFromMavenProperties()
getVersionFromMavenProperties
in interface BrooklynVersionService
@Nullable public java.lang.String getVersionFromOsgiManifest()
getVersionFromOsgiManifest
in interface BrooklynVersionService
@Nullable public java.lang.String getSha1FromOsgiManifest()
BrooklynVersionService
getSha1FromOsgiManifest
in interface BrooklynVersionService
public java.lang.String getVersion()
getVersion
in interface BrooklynVersionService
public boolean isSnapshot()
isSnapshot
in interface BrooklynVersionService
public static boolean isDevelopmentEnvironment()
public void logSummary()
logSummary
in interface BrooklynVersionService
public static java.lang.String get()
public static BrooklynVersion getInstance()
public static java.lang.Iterable<BrooklynVersion.BrooklynFeature> getFeatures(ManagementContext mgmt)
mgmt
- The context to search for features.public static java.lang.String getOsgiVersion()