Mavanagaiata – [maˈvanaˈɡaːjaˈta] – is a Maven plugin providing information about the Git repository of your project.
- Maven 2.0+
- Apache Commons IO 2.4
- JGit 2.1.0
Mavanagaiata is available from the Central Repository and will be automatically installed by Maven once you add it as a plugin to your project. If you want to have the newest features available in the development code or you want to hack on the code you are free to clone the Git repository and install it manually. You can do so using the following commands:
$ git clone git://github.com/koraktor/mavanagaiata.git $ cd mavanagaiata $ mvn install
To use the Mavanagaiata plugin in your Maven project you will have to include the plugin in your POM and add the configuration suitable for your needs:
<project ...> ... <build> <plugins> <plugin> <groupId>com.github.koraktor</groupId> <artifactId>mavanagaiata</artifactId> <executions> <execution> <id>load-git-branch</id> <goals> <goal>branch</goal> </goals> </execution> </executions> </plugin> ... </plugins> ... </build> </project>
Mavanagaiata provides the following goals each reading specific information from the Git repository.
branch: Information about the currently checked out branch
changelog: Generates a changelog from Git commits and tags
commit: Information about the current commit
contributors: Generates a list of contributors from Git commits
tag: Information about the most recent tag
Each goal stores its information into the project's properties. The following
property keys will be prefixed with
You may override this with the configuration property
branch: The name of the currently checked out branch
abbrev: The abbreviated SHA ID of the current commit
author.date: The date the commit has been authored
author.name: The name of the author of the current commit
author.email: The email address of the author of the current commit
committer.date: The date the commit has been committed
committer.name: The name of the committer of the current commit
committer.email: The email address of the committer of the current commit
sha: The full SHA ID of the current commit
name: The name of the most recent tag (if any)
describe: A combination of the tag name and the current commit ID (same as
Mavanagaiata provides several configuration properties for its goals. The
following ones are global and can be used for any goal. They must be prefixed
mavanagaiata. when used on the command-line:
dateFormat: The date format to use for various dates (default:
"MM/dd/yyyy hh:mm a Z")
dirtyFlag: The flag to append to various values if there are changes in the index or worktree (default:
encoding: The encoding to use for output files (default:
footer: The footer to append to generated output (default:
"\nGenerated by Mavanagaiata at %s"). The
%swill be replaced by a formatted date.
gitDir: Specify the GIT_DIR to use (default:
head: Specify the commit or ref used as a starting point (default:
skip: Don't execute the goal(s) at all (default:
skipNoGit: Don't execute the goal(s) when not inside a Git repository (default
false). This prevents failures when building from intermediate copies of the project files.
Additionally, there are some properties specific to a goal:
dateFormat: The date format to use for tag output (default:
header: The header to print above the changelog (default:
commitPrefix: The string to prepend to every commit message (default:
" * ")
gitHubLinks: Whether to generate links to GitHub's compare view (default:
gitHubProject: The project name for GitHub links (default: not set)
gitHubUser: The project user for GitHub links (default: not set)
outputFile: If set, the changelog will not be printed to
System.out, but into the given file. (default: not set)
skipTagged: Whether to skip tagged commits' messages. This is useful when usually tagging commits like "Version bump to X.Y.Z" (default:
tagPrefix: The string to prepend to the tag name (default:
dateFormat: The date format to use for commit dates (default:
dirtyFlag: The flag to append to the SHA ID if there are changes in the index or worktree (default:
header: The header to print above the contributor list (default:
outputFile: If set, the list will not be printed to
System.out, but into the given file. (default: not set)
showCounts: Whether to show the number of contributions for each author (default:
showEmail: Whether to show the email addresses of contributors (default:
sort: The sorting applied to the list of contributors, may be one of "count", "date" and "name". (default:
dirtyFlag: The flag to append to the tag name if there are changes in the index or worktree (default:
About the name
The name is a completely invented word hopefully sounding like a mighty god of an ancient, Southeast Asian primitive people or a similar mighty monster that same primitive people is afraid of.
Instead, it's just a combination of the command-line tools of Maven and Git:
git. Each character is suffixed with the character
In Java code you would write this as:
("mvn" + "git").replaceAll("(.)", "$1a") => "mavanagaiata"
Mavanagaiata is an open-source project. Therefore you are free to help improving it. There are several ways of contributing to Mavanagaiata's development:
- Build projects using it and spread the word.
- Report problems and request features using the issue tracker.
- Write patches yourself to fix bugs and implement new functionality.
- Create a Mavanagaiata fork on GitHub and start hacking. Extra points for using GitHub's pull requests and feature branches.
This code is free software; you can redistribute it and/or modify it under the terms of the new BSD License. A copy of this license can be found in the included LICENSE file.
- Sebastian Staudt -- koraktor(at)gmail.com
- Pablo Graña -- pablo.grana(at)globant.com
- Henning Schmiedehausen -- hgschmie(at)fb.com
- Santeri Vesalainen -- santeri.vesalainen(at)gmail.com