Class GitCommitPropertyConstant

java.lang.Object
pl.project13.core.GitCommitPropertyConstant

public class GitCommitPropertyConstant extends 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 final String
    Represents the current branch name.
    static final String
    Represents the git user eMail that is configured where the properties have been generated.
    static final String
    Represents the git user name that is configured where the properties have been generated.
    static final String
    Represents the hostname where the properties have been generated.
    static final String
    The git.build.number* variables are available on some hosted CIs and can be used to identify the "number" of the build.
    static final String
    The git.build.number* variables are available on some hosted CIs and can be used to identify the "number" of the build.
    static final String
    Represents the (formatted) timestamp when the last build was executed.
    static final String
    Represents the project version of the current project.
    static final String
    Represents the number of commits to the closest available tag.
    static final String
    Represents the name of the closest available tag.
    static final String
    Represents the user eMail of the user who performed the commit.
    static final String
    Represents the user name of the user who performed the commit.
    static final String
    Represents the (formatted) time stamp when the commit has been originally performed.
    static final String
    Represents the (formatted) time stamp when the commit has been performed.
    static final String
    Represents an object a human readable name based on a the commit (provides git describe for the given commit).
    static final String
    Represents the abbreviated (shorten version) commit hash.
    static final String
    Represents the commit’s SHA-1 hash.
    static final String
    Represents the commit’s SHA-1 hash.
    static final String
    Represents the raw body (unwrapped subject and body) of the commit message.
    static final String
    Represents the subject of the commit message - may not be suitable for filenames.
    static final String
    Represents the same value as git.commit.id.describe, just with the git hash part removed (the g2414721 part from git describe).
    static final String
    Represents the (formatted) time stamp when the commit has been performed.
    static final String
    A working tree is said to be "dirty" if it contains modifications which have not been committed to the current branch.
    static final String
    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 final String
    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 final String
    Represents the URL of the remote repository for the current git project.
    static final String
    Represents the tag on the current commit.
    static final String
    Represents a list of tags which contain the specified commit.
    static final String
    Represents the total count of all commits in the current repository.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Methods inherited from class java.lang.Object

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

    • BRANCH

      public static final 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:
    • LOCAL_BRANCH_AHEAD

      public static final 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:
    • LOCAL_BRANCH_BEHIND

      public static final 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:
    • DIRTY

      public static final 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:
    • COMMIT_ID_FLAT

      public static final 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:
    • COMMIT_ID_FULL

      public static final 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:
    • COMMIT_ID_ABBREV

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

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

      public static final 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:
    • BUILD_AUTHOR_NAME

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

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

      public static final 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:
    • BUILD_VERSION

      public static final String BUILD_VERSION
      Represents the project version of the current project.
      See Also:
    • BUILD_HOST

      public static final String BUILD_HOST
      Represents the hostname where the properties have been generated.
      See Also:
    • BUILD_NUMBER

      public static final 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:

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

      public static final 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:

      • AWS CodeBuild
      • Gitlab CI (Gitlab >11.0)
      • GitHub Actions
      • TeamCity
      • Travis
      See Also:
    • COMMIT_AUTHOR_NAME

      public static final String COMMIT_AUTHOR_NAME
      Represents the user name of the user who performed the commit.
      See Also:
    • COMMIT_AUTHOR_EMAIL

      public static final String COMMIT_AUTHOR_EMAIL
      Represents the user eMail of the user who performed the commit.
      See Also:
    • COMMIT_MESSAGE_FULL

      public static final 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:
    • COMMIT_MESSAGE_SHORT

      public static final 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:
    • COMMIT_TIME

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

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

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

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

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

      public static final 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:
    • TAG

      public static final String TAG
      Represents the tag on the current commit. Similar to running
           git tag --points-at HEAD
       
      See Also:
    • CLOSEST_TAG_COMMIT_COUNT

      public static final 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:
    • TOTAL_COMMIT_COUNT

      public static final 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:
  • Constructor Details

    • GitCommitPropertyConstant

      public GitCommitPropertyConstant()