Class TagMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.github.koraktor.mavanagaiata.mojo.AbstractGitMojo
-
- com.github.koraktor.mavanagaiata.mojo.TagMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="tag", defaultPhase=INITIALIZE, threadSafe=true) public class TagMojo extends AbstractGitMojoThis goal provides the most recent Git tag in the "mavanagaiata.tag" and "mvngit.tag" properties.- Since:
- 0.1.0
- Author:
- Sebastian Staudt
-
-
Field Summary
-
Fields inherited from class com.github.koraktor.mavanagaiata.mojo.AbstractGitMojo
baseDir, dateFormat, dirtyFlag, dirtyIgnoreUntracked, failGracefully, gitDir, head, project, propertyPrefixes, skip, skipNoGit
-
-
Constructor Summary
Constructors Constructor Description TagMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun(GitRepository repository)This will first read all tags and walk the commit hierarchy down from HEAD until it finds one of the tags.-
Methods inherited from class com.github.koraktor.mavanagaiata.mojo.AbstractGitMojo
addProperty, execute, init, initRepository, prepareParameters
-
-
-
-
Method Detail
-
run
public void run(GitRepository repository) throws MavanagaiataMojoException
This will first read all tags and walk the commit hierarchy down from HEAD until it finds one of the tags. The name of that tag is written into "mavanagaiata.tag" and "mvngit.tag" respectively.- Specified by:
runin classAbstractGitMojo- Parameters:
repository- The repository instance to use- Throws:
MavanagaiataMojoException- if the tags cannot be read
-
-