Enum BuildInformation

  • All Implemented Interfaces:
    Serializable, Comparable<BuildInformation>

    @ParametersAreNonnullByDefault
    public enum BuildInformation
    extends Enum<BuildInformation>
    Singleton which provides build and version information for the Confluence application. Configuration is read from "com/atlassian/confluence/default.properties" on the classpath.

    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.

    • Method Detail

      • values

        public static BuildInformation[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (BuildInformation c : BuildInformation.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static BuildInformation valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getVersionNumber

        public String getVersionNumber()
        Returns:
        the version number of this release of Confluence. Components are generally separated by either dots or dashes. Pre-release versions include letters as well as numbers. Sample release versions: 2.0, 2.8.2. Sample pre-release versions: 3.0-SNAPSHOT, 2.9-m4, 2.10-rc1.
      • getBuildDate

        public @NonNull Date getBuildDate()
        Returns:
        the date this version of Confluence was built
      • getBuildYear

        public String getBuildYear()
        Returns:
        the year this version of Confluence was built
        See Also:
        getBuildDate()
      • getBuildTimestamp

        public @NonNull Date getBuildTimestamp()
        Returns:
        the timestamp this version of Confluence was built
      • getBuildNumber

        public String getBuildNumber()
        Returns:
        a unique number for each release of Confluence. Used primarily to manage the execution of upgrade tasks. May be a value like '@BUILD_NUMBER@' during development.
      • getGitCommitHash

        public String getGitCommitHash()
        Returns the SHA-1 hash of the Git commit object this artifact is based on.

        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 their PATH or the artifact was built from a non-Git managed folder structure.

        Returns:
        SHA-1 of the Git commit object this artifact is based on, or empty
        Since:
        5.0
      • getBambooBuildKey

        public String getBambooBuildKey()
        Returns the Bamboo build key of the build producing this artifact.

        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>.

        Returns:
        the Bamboo build key of the build producing this artifact, or empty if built by other means
        Since:
        5.0
      • getBambooBuildNumber

        public String getBambooBuildNumber()
        Returns:
        the ${bamboo.buildNumber} of the build producing this artifact, or empty if built by other means
        See Also:
        getBambooBuildKey()
      • getMarketplaceBuildNumber

        public String getMarketplaceBuildNumber()
      • getBundledSynchronyVersion

        public String getBundledSynchronyVersion()
        Returns:
        the Synchrony version bundled in Confluence
        Since:
        6.1.2
      • getZduMinVersion

        public String getZduMinVersion()
        Returns:
        the minimum Confluence version that is ZDU compatible with the current version
        Since:
        7.12