public class MavenVersionStrategy extends VersionStrategy<MavenVersionStrategy>
VersionStrategy.StrategySearchMode| Constructor and Description |
|---|
MavenVersionStrategy(VersionNamingConfiguration vnc,
org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.api.Git git,
MetadataRegistrar metadatas) |
| Modifier and Type | Method and Description |
|---|---|
Version |
build(Commit head,
List<Commit> parents)
Build a version using the given information extracted from the git repository.
|
MavenVersionStrategy |
setForceComputation(boolean forceComputation) |
MavenVersionStrategy |
setUseDirty(boolean useDirty) |
computeTagType, enhanceVersionWithBranch, findMaxVersionCommit, findTagToUse, findVersionCommit, getBaseVersionAndRegisterMetadata, getGit, getRegistrar, getRepository, getVersionNamingConfiguration, isBaseCommitOnHead, isGitDirty, isVersionTag, maxVersionTag, maxVersionTag, runAndGetSelf, searchDepthLimit, searchMode, self, setSearchDepthLimit, tagToVersion, toVersionTarget, toVersionTarget, versionFromTagpublic MavenVersionStrategy(VersionNamingConfiguration vnc, org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.api.Git git, MetadataRegistrar metadatas)
public Version build(Commit head, List<Commit> parents) throws VersionCalculationException
VersionStrategybuild in class VersionStrategy<MavenVersionStrategy>head - cannot be null the current head commitparents - a non null list of commits that will be involved in version naming.
The list cannot be null and contains the first commit of the repository if no commit with version tag can be found.VersionCalculationException - in case an error occurred while computing the versionpublic MavenVersionStrategy setUseDirty(boolean useDirty)
public MavenVersionStrategy setForceComputation(boolean forceComputation)
Copyright © 2016–2021 Matthieu Brouillard. All rights reserved.