Class GitCommitPropertyConstant


  • public class GitCommitPropertyConstant
    extends java.lang.Object
    A class that represents all properties that may be generated by the plugin and exposed to maven.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String BRANCH
      Represents the current branch name.
      static java.lang.String BUILD_AUTHOR_EMAIL
      Represents the git user eMail that is configured where the properties have been generated.
      static java.lang.String BUILD_AUTHOR_NAME
      Represents the git user name that is configured where the properties have been generated.
      static java.lang.String BUILD_HOST
      Represents the hostname where the properties have been generated.
      static java.lang.String BUILD_NUMBER
      The git.build.number* variables are available on some hosted CIs and can be used to identify the "number" of the build.
      static java.lang.String BUILD_NUMBER_UNIQUE
      The git.build.number* variables are available on some hosted CIs and can be used to identify the "number" of the build.
      static java.lang.String BUILD_TIME
      Represents the (formatted) timestamp when the last build was executed.
      static java.lang.String BUILD_VERSION
      Represents the project version of the current project.
      static java.lang.String CLOSEST_TAG_COMMIT_COUNT
      Represents the number of commits to the closest available tag.
      static java.lang.String CLOSEST_TAG_NAME
      Represents the name of the closest available tag.
      static java.lang.String COMMIT_AUTHOR_EMAIL
      Represents the user eMail of the user who performed the commit.
      static java.lang.String COMMIT_AUTHOR_NAME
      Represents the user name of the user who performed the commit.
      static java.lang.String COMMIT_AUTHOR_TIME
      Represents the (formatted) time stamp when the commit has been originally performed.
      static java.lang.String COMMIT_COMMITTER_TIME
      Represents the (formatted) time stamp when the commit has been performed.
      static java.lang.String COMMIT_DESCRIBE
      Represents an object a human readable name based on a the commit (provides git describe for the given commit).
      static java.lang.String COMMIT_ID_ABBREV
      Represents the abbreviated (shorten version) commit hash.
      static java.lang.String COMMIT_ID_FLAT
      Represents the commit’s SHA-1 hash.
      static java.lang.String COMMIT_ID_FULL
      Represents the commit’s SHA-1 hash.
      static java.lang.String COMMIT_MESSAGE_FULL
      Represents the raw body (unwrapped subject and body) of the commit message.
      static java.lang.String COMMIT_MESSAGE_SHORT
      Represents the subject of the commit message - may not be suitable for filenames.
      static java.lang.String COMMIT_SHORT_DESCRIBE
      Represents the same value as git.commit.id.describe, just with the git hash part removed (the g2414721 part from git describe).
      static java.lang.String COMMIT_TIME
      Represents the (formatted) time stamp when the commit has been performed.
      static java.lang.String DIRTY
      A working tree is said to be "dirty" if it contains modifications which have not been committed to the current branch.
      static java.lang.String LOCAL_BRANCH_AHEAD
      Represents the count of commits that your local branch is ahead in perspective to the remote branch (usually the case when your local branch has committed changes that are not pushed yet to the remote branch).
      static java.lang.String LOCAL_BRANCH_BEHIND
      Represents the count of commits that your local branch is behind in perspective to the remote branch (usually the case when there are commits in the remote branch that are not yet integrated into your local branch).
      static java.lang.String REMOTE_ORIGIN_URL
      Represents the URL of the remote repository for the current git project.
      static java.lang.String TAGS
      Represents a list of tags which contain the specified commit.
      static java.lang.String TOTAL_COMMIT_COUNT
      Represents the total count of all commits in the current repository.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • BRANCH

        public static final java.lang.String BRANCH
        Represents the current branch name. Falls back to commit-id for detached HEAD. Note: When an user uses the evaluateOnCommit property to gather the branch for an arbitrary commit (really anything besides the default HEAD) this plugin will perform a git branch --points-at which might return a comma separated list of branch names that points to the specified commit.
        See Also:
        Constant Field Values
      • LOCAL_BRANCH_AHEAD

        public static final java.lang.String LOCAL_BRANCH_AHEAD
        Represents the count of commits that your local branch is ahead in perspective to the remote branch (usually the case when your local branch has committed changes that are not pushed yet to the remote branch).

        Note: To obtain the right value for this property this plugin should operate in online mode (<offline>false</offline>) so a git fetch will be performed before retrieval.

        See Also:
        Constant Field Values
      • LOCAL_BRANCH_BEHIND

        public static final java.lang.String LOCAL_BRANCH_BEHIND
        Represents the count of commits that your local branch is behind in perspective to the remote branch (usually the case when there are commits in the remote branch that are not yet integrated into your local branch).

        Note: To obtain the right value for this property this plugin should operate in online mode (<offline>false</offline>) so a git fetch will be performed before retrieval.

        See Also:
        Constant Field Values
      • DIRTY

        public static final java.lang.String DIRTY
        A working tree is said to be "dirty" if it contains modifications which have not been committed to the current branch.
        See Also:
        Constant Field Values
      • COMMIT_ID_FLAT

        public static final java.lang.String COMMIT_ID_FLAT
        Represents the commit’s SHA-1 hash. Note this is exchangeable with the git.commit.id.full property and might not be exposed. See commitIdGenerationMode.
        See Also:
        Constant Field Values
      • COMMIT_ID_FULL

        public static final java.lang.String COMMIT_ID_FULL
        Represents the commit’s SHA-1 hash. Note this is exchangeable with the git.commit.id property and might not be exposed. See commitIdGenerationMode.
        See Also:
        Constant Field Values
      • COMMIT_ID_ABBREV

        public static final java.lang.String COMMIT_ID_ABBREV
        Represents the abbreviated (shorten version) commit hash.
        See Also:
        Constant Field Values
      • COMMIT_DESCRIBE

        public static final java.lang.String COMMIT_DESCRIBE
        Represents an object a human readable name based on a the commit (provides git describe for the given commit).
        See Also:
        Constant Field Values
      • COMMIT_SHORT_DESCRIBE

        public static final java.lang.String COMMIT_SHORT_DESCRIBE
        Represents the same value as git.commit.id.describe, just with the git hash part removed (the g2414721 part from git describe).
        See Also:
        Constant Field Values
      • BUILD_AUTHOR_NAME

        public static final java.lang.String BUILD_AUTHOR_NAME
        Represents the git user name that is configured where the properties have been generated.
        See Also:
        Constant Field Values
      • BUILD_AUTHOR_EMAIL

        public static final java.lang.String BUILD_AUTHOR_EMAIL
        Represents the git user eMail that is configured where the properties have been generated.
        See Also:
        Constant Field Values
      • BUILD_TIME

        public static final java.lang.String BUILD_TIME
        Represents the (formatted) timestamp when the last build was executed. If written to the git.properties file represents the latest build time when that file was written / updated.
        See Also:
        Constant Field Values
      • BUILD_VERSION

        public static final java.lang.String BUILD_VERSION
        Represents the project version of the current project.
        See Also:
        Constant Field Values
      • BUILD_HOST

        public static final java.lang.String BUILD_HOST
        Represents the hostname where the properties have been generated.
        See Also:
        Constant Field Values
      • BUILD_NUMBER

        public static final java.lang.String BUILD_NUMBER
        The git.build.number* variables are available on some hosted CIs and can be used to identify the "number" of the build. This represents a project specific build number.

        Currently supported CIs:

        • Bamboo
        • Hudson/Jenkins
        • TeamCity
        • Travis
        • Gitlab CI (Gitlab >8.10 & Gitlab CI >0.5)
        • Azure DevOps
        • AWS CodeBuild
        • Bitbucket Pipelines
        See Also:
        Constant Field Values
      • BUILD_NUMBER_UNIQUE

        public static final java.lang.String BUILD_NUMBER_UNIQUE
        The git.build.number* variables are available on some hosted CIs and can be used to identify the "number" of the build. This represents a system wide unique build number.

        Currently supported CIs:

        • TeamCity
        • Travis
        • Gitlab CI (Gitlab >11.0)
        • AWS CodeBuild
        See Also:
        Constant Field Values
      • COMMIT_AUTHOR_NAME

        public static final java.lang.String COMMIT_AUTHOR_NAME
        Represents the user name of the user who performed the commit.
        See Also:
        Constant Field Values
      • COMMIT_AUTHOR_EMAIL

        public static final java.lang.String COMMIT_AUTHOR_EMAIL
        Represents the user eMail of the user who performed the commit.
        See Also:
        Constant Field Values
      • COMMIT_MESSAGE_FULL

        public static final java.lang.String COMMIT_MESSAGE_FULL
        Represents the raw body (unwrapped subject and body) of the commit message. Similar to running
             git log -1 --pretty=format:%B
         
        See Also:
        Constant Field Values
      • COMMIT_MESSAGE_SHORT

        public static final java.lang.String COMMIT_MESSAGE_SHORT
        Represents the subject of the commit message - may not be suitable for filenames. Similar to running
             git log -1 --pretty=format:%s
         
        See Also:
        Constant Field Values
      • COMMIT_TIME

        public static final java.lang.String COMMIT_TIME
        Represents the (formatted) time stamp when the commit has been performed.
        See Also:
        Constant Field Values
      • COMMIT_AUTHOR_TIME

        public static final java.lang.String COMMIT_AUTHOR_TIME
        Represents the (formatted) time stamp when the commit has been originally performed.
        See Also:
        Constant Field Values
      • COMMIT_COMMITTER_TIME

        public static final java.lang.String COMMIT_COMMITTER_TIME
        Represents the (formatted) time stamp when the commit has been performed.
        See Also:
        Constant Field Values
      • REMOTE_ORIGIN_URL

        public static final java.lang.String REMOTE_ORIGIN_URL
        Represents the URL of the remote repository for the current git project.
        See Also:
        Constant Field Values
      • TAGS

        public static final java.lang.String TAGS
        Represents a list of tags which contain the specified commit. Similar to running
             git tag --contains
         
        See Also:
        Constant Field Values
      • CLOSEST_TAG_NAME

        public static final java.lang.String CLOSEST_TAG_NAME
        Represents the name of the closest available tag. The closest tag may depend on your git describe config that may or may not take lightweight tags into consideration.
        See Also:
        Constant Field Values
      • CLOSEST_TAG_COMMIT_COUNT

        public static final java.lang.String CLOSEST_TAG_COMMIT_COUNT
        Represents the number of commits to the closest available tag. The closest tag may depend on your git describe config that may or may not take lightweight tags into consideration.
        See Also:
        Constant Field Values
      • TOTAL_COMMIT_COUNT

        public static final java.lang.String TOTAL_COMMIT_COUNT
        Represents the total count of all commits in the current repository. Similar to running
             git rev-list HEAD --count
         
        See Also:
        Constant Field Values
    • Constructor Detail

      • GitCommitPropertyConstant

        public GitCommitPropertyConstant()