public class BrooklynVersion
extends java.lang.Object
Also retrieves the SHA-1 from any OSGi bundle, and checks that the maven and osgi versions match.
Modifier and Type | Field and Description |
---|---|
static BrooklynVersion |
INSTANCE |
Constructor and Description |
---|
BrooklynVersion() |
Modifier and Type | Method and Description |
---|---|
void |
checkVersions() |
static java.lang.String |
get() |
java.lang.String |
getSha1FromOsgiManifest() |
java.lang.String |
getVersion() |
java.lang.String |
getVersionFromClasspath()
Deprecated.
since 0.7.0, in favour of the more specific methods (and does anyone need that default value?)
|
java.lang.String |
getVersionFromMavenProperties() |
java.lang.String |
getVersionFromOsgiManifest() |
static java.lang.String |
getVersionFromStatic()
Deprecated.
since 0.7.0, redundant with
get() |
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()
@Deprecated public java.lang.String getVersionFromClasspath()
getVersionFromMavenProperties()
and getVersionFromOsgiManifest()
.@Nullable public java.lang.String getVersionFromMavenProperties()
@Nullable public java.lang.String getVersionFromOsgiManifest()
@Nullable public java.lang.String getSha1FromOsgiManifest()
public java.lang.String getVersion()
public boolean isSnapshot()
public static boolean isDevelopmentEnvironment()
In a packaged or library build of Brooklyn (normal usage) this should return false, and all OSGi components should be available.
There is no longer any way to force this, such as the old BrooklynDevelopmentMode class; but that could easily be added if required (eg as a system property).
public void logSummary()
@Deprecated public static java.lang.String getVersionFromStatic()
get()
public static java.lang.String get()