Class BranchMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.github.koraktor.mavanagaiata.mojo.AbstractGitMojo
-
- com.github.koraktor.mavanagaiata.mojo.BranchMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="branch", defaultPhase=INITIALIZE, threadSafe=true) public class BranchMojo extends AbstractGitMojoThis goal provides the currently checked out Git branch in the "mavanagaiata.branch" and "mvngit.branch" 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 BranchMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun(GitRepository repository)Information about the currently checked out Git branch is retrieved using a JGit Repository instance-
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
Information about the currently checked out Git branch is retrieved using a JGit Repository instance- Specified by:
runin classAbstractGitMojo- Parameters:
repository- The repository instance to use- Throws:
MavanagaiataMojoException- if retrieving information from the Git repository fails- See Also:
Repository.getBranch()
-
-