public abstract class GitDataProvider extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
abbrevLength |
protected String |
dateFormat |
protected String |
dateFormatTimeZone |
protected GitDescribeConfig |
gitDescribe |
protected LoggerBridge |
loggerBridge |
protected String |
prefixDot |
protected boolean |
verbose |
| Constructor and Description |
|---|
GitDataProvider(LoggerBridge loggerBridge) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
determineBranchName(Map<String,String> env)
If running within Jenkins/Hudosn, honor the branch name passed via GIT_BRANCH env var.
|
protected String |
determineBranchNameOnBuildServer(Map<String,String> env)
Is "Jenkins aware", and prefers
GIT_BRANCH to getting the branch via git if that enviroment variable is set. |
protected abstract void |
finalCleanUp() |
protected abstract String |
getAbbrevCommitId() |
protected abstract String |
getBranchName() |
protected abstract String |
getBuildAuthorEmail() |
protected abstract String |
getBuildAuthorName() |
protected abstract String |
getClosestTagCommitCount() |
protected abstract String |
getClosestTagName() |
protected abstract String |
getCommitAuthorEmail() |
protected abstract String |
getCommitAuthorName() |
protected abstract String |
getCommitId() |
protected abstract String |
getCommitMessageFull() |
protected abstract String |
getCommitMessageShort() |
protected abstract String |
getCommitTime() |
protected abstract String |
getGitDescribe() |
protected abstract String |
getRemoteOriginUrl() |
protected SimpleDateFormat |
getSimpleDateFormatWithTimeZone() |
protected abstract String |
getTags() |
protected abstract void |
init() |
protected abstract boolean |
isDirty() |
void |
loadGitData(Properties properties) |
protected abstract void |
prepareGitToExtractMoreDetailedReproInformation() |
protected void |
put(Properties properties,
String key,
String value) |
GitDataProvider |
setAbbrevLength(int abbrevLength) |
GitDataProvider |
setDateFormat(String dateFormat) |
GitDataProvider |
setDateFormatTimeZone(String dateFormatTimeZone) |
GitDataProvider |
setGitDescribe(GitDescribeConfig gitDescribe) |
GitDataProvider |
setPrefixDot(String prefixDot) |
@NotNull protected LoggerBridge loggerBridge
protected boolean verbose
protected String prefixDot
protected int abbrevLength
protected String dateFormat
protected String dateFormatTimeZone
protected GitDescribeConfig gitDescribe
public GitDataProvider(@NotNull
LoggerBridge loggerBridge)
public GitDataProvider setGitDescribe(GitDescribeConfig gitDescribe)
public GitDataProvider setPrefixDot(String prefixDot)
public GitDataProvider setAbbrevLength(int abbrevLength)
public GitDataProvider setDateFormat(String dateFormat)
public GitDataProvider setDateFormatTimeZone(String dateFormatTimeZone)
protected abstract void init()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected abstract String getBuildAuthorName()
protected abstract String getBuildAuthorEmail()
protected abstract void prepareGitToExtractMoreDetailedReproInformation()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected abstract String getBranchName() throws IOException
IOExceptionprotected abstract String getGitDescribe() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected abstract String getCommitId()
protected abstract String getAbbrevCommitId() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected abstract boolean isDirty()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected abstract String getCommitAuthorName()
protected abstract String getCommitAuthorEmail()
protected abstract String getCommitMessageFull()
protected abstract String getCommitMessageShort()
protected abstract String getCommitTime()
protected abstract String getRemoteOriginUrl() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected abstract String getTags() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected abstract String getClosestTagName() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected abstract String getClosestTagCommitCount() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected abstract void finalCleanUp()
public void loadGitData(@NotNull
Properties properties)
throws IOException,
org.apache.maven.plugin.MojoExecutionException
IOExceptionorg.apache.maven.plugin.MojoExecutionExceptionprotected String determineBranchName(Map<String,String> env) throws IOException
env - environment settingsIOExceptionprotected String determineBranchNameOnBuildServer(Map<String,String> env) throws IOException
GIT_BRANCH to getting the branch via git if that enviroment variable is set.
The GIT_BRANCH variable is set by Jenkins/Hudson when put in detached HEAD state, but it still knows which branch was cloned.IOExceptionprotected SimpleDateFormat getSimpleDateFormatWithTimeZone()
protected void put(@NotNull
Properties properties,
String key,
String value)
Copyright © 2015. All Rights Reserved.