@ParametersAreNonnullByDefault public enum BuildInformation extends Enum<BuildInformation>
Note that the build number in the application's home directory or database may differ from the version of the application at various times. This object only represents the build information of the application itself.
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Field and Description |
---|---|
static String |
TIMESTMP_FMT |
Modifier and Type | Method and Description |
---|---|
String |
getBambooBuildKey()
Returns the Bamboo build key of the build producing this artifact.
|
String |
getBambooBuildNumber() |
Date |
getBuildDate() |
String |
getBuildNumber() |
Date |
getBuildTimestamp() |
String |
getBuildYear() |
String |
getGitCommitHash()
Returns the SHA-1 hash of the Git commit object this artifact is based on.
|
String |
getMajorVersion()
Deprecated.
since 5.2. Use
getVersionNumber() . |
String |
getRevisionNumber()
Deprecated.
since 5.0 use
getGitCommitHash() instead |
String |
getVersionNumber() |
String |
toString() |
static BuildInformation |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BuildInformation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BuildInformation INSTANCE
public static final String TIMESTMP_FMT
public static BuildInformation[] values()
for (BuildInformation c : BuildInformation.values()) System.out.println(c);
public static BuildInformation valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getVersionNumber()
@Deprecated public String getMajorVersion()
getVersionNumber()
.public Date getBuildDate()
public String getBuildYear()
getBuildDate()
public Date getBuildTimestamp()
public String getBuildNumber()
@Deprecated public String getRevisionNumber()
getGitCommitHash()
insteadpublic String getGitCommitHash()
In case of a released artifact, points to a commit updating the POMs to point to the getVersionNumber()
.
The value may be "UNKNOWN" in case this is not a released artifact and the builder did not have Git available on his PATH or the artifact was build from a non-Git managed folder structure.
public String getBambooBuildKey()
The build key looks like e.g. BAM-MAIN-JOBX which identifies a job in a Bamboo plan.
You can identify the execution by composing the Bamboo build key with the Bamboo build number,
<baseUrl>/browse/<bambooBuildKey>-<bambooBuildNumber>.
public String getBambooBuildNumber()
getBambooBuildKey()
public String toString()
toString
in class Enum<BuildInformation>
Copyright © 2003–2016 Atlassian. All rights reserved.