public class LocalGitRepo extends Object
| Modifier and Type | Field and Description |
|---|---|
org.eclipse.jgit.api.Git |
git |
| Modifier and Type | Method and Description |
|---|---|
Collection<org.eclipse.jgit.lib.Ref> |
allRemoteTags() |
void |
errorIfNotClean() |
static LocalGitRepo |
fromCurrentDir(String remoteUrl)
Uses the current working dir to open the Git repository.
|
List<String> |
getRemoteTags(List<String> tagNamesToSearchFor) |
boolean |
hasLocalTag(String tagName) |
List<String> |
remoteTagsFrom(List<AnnotatedTag> annotatedTags) |
boolean |
revertChanges(org.apache.maven.plugin.logging.Log log,
List<File> changedFiles) |
org.eclipse.jgit.lib.Ref |
tagRepo(AnnotatedTag tag) |
void |
tagRepoAndPush(AnnotatedTag tag) |
public void errorIfNotClean()
throws ValidationException
ValidationExceptionpublic boolean revertChanges(org.apache.maven.plugin.logging.Log log,
List<File> changedFiles)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic boolean hasLocalTag(String tagName) throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIExceptionpublic void tagRepoAndPush(AnnotatedTag tag) throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIExceptionpublic org.eclipse.jgit.lib.Ref tagRepo(AnnotatedTag tag) throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIExceptionpublic static LocalGitRepo fromCurrentDir(String remoteUrl) throws ValidationException
remoteUrl - The value in pom.scm.connection or null if none specified, in which case the default remote is used.ValidationException - if anything goes wrongpublic List<String> remoteTagsFrom(List<AnnotatedTag> annotatedTags) throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIExceptionpublic List<String> getRemoteTags(List<String> tagNamesToSearchFor) throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIExceptionpublic Collection<org.eclipse.jgit.lib.Ref> allRemoteTags() throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIExceptionCopyright © 2015–2017. All rights reserved.