Klasse ContributorsMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.github.koraktor.mavanagaiata.mojo.AbstractGitMojo
com.github.koraktor.mavanagaiata.mojo.AbstractGitOutputMojo
com.github.koraktor.mavanagaiata.mojo.ContributorsMojo
- Alle implementierten Schnittstellen:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="contributors",
defaultPhase=PROCESS_RESOURCES,
threadSafe=true)
public class ContributorsMojo
extends AbstractGitOutputMojo
This goal allows to generate a list of contributors for the currently
checked out branch of the Git repository. It will list all authors of the
commits in this branch. It can be configured to display the changelog or
save it to a file.
- Seit:
- 0.2.0
- Autor:
- Sebastian Staudt
-
Verschachtelte Klassen - Übersicht
Modifizierer und TypKlasseBeschreibung(Package privat) class
(Package privat) class
-
Feldübersicht
Modifizierer und TypFeldBeschreibung(Package privat) String
The string to prepend to every contributor name(Package privat) boolean
(Package privat) boolean
(Package privat) String
The header to print above the changelogprivate MailMap
private static final Map<CharSequence,
CharSequence> private static final org.apache.commons.text.translate.CharSequenceTranslator
(Package privat) File
The file to write the contributors list to(Package privat) boolean
Whether the number of contributions should be listed(Package privat) boolean
Whether the email addresses of contributors should be listed(Package privat) String
The method used to sort contributorsVon Klasse geerbte Felder com.github.koraktor.mavanagaiata.mojo.AbstractGitOutputMojo
encoding, footer, printStream
Von Klasse geerbte Felder com.github.koraktor.mavanagaiata.mojo.AbstractGitMojo
baseDir, dateFormat, dirtyFlag, dirtyIgnoreUntracked, failGracefully, gitDir, head, project, propertyPrefixes, skip, skipNoGit
Von Schnittstelle geerbte Felder org.apache.maven.plugin.Mojo
ROLE
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprivate String
escapeName
(String name) Returns an escaped form of the contributor nameReturns the output file for the generated contributors listprotected void
Selects the attribute to use for sorting contributorsvoid
setOutputFile
(File outputFile) Sets the output file for the generated contributors listprotected void
writeOutput
(GitRepository repository) Walks through the history of the currently checked out branch of the Git repository and builds a list of contributors from the authors of the commits.Von Klasse geerbte Methoden com.github.koraktor.mavanagaiata.mojo.AbstractGitOutputMojo
createPrintStream, generateOutput, init, run, unescapeFormatNewlines
Von Klasse geerbte Methoden com.github.koraktor.mavanagaiata.mojo.AbstractGitMojo
addProperty, execute, initRepository, prepareParameters
Von Klasse geerbte Methoden org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Felddetails
-
MARKDOWN_TRANSLATION_MAP
-
MARKDOWN_TRANSLATOR
private static final org.apache.commons.text.translate.CharSequenceTranslator MARKDOWN_TRANSLATOR -
contributorPrefix
@Parameter(property="mavanagaiata.contributors.contributorPrefix", defaultValue=" * ") String contributorPrefixThe string to prepend to every contributor name -
escapeHtml
@Parameter(property="mavanagaiata.contributors.escapeHtml", defaultValue="false") boolean escapeHtml -
escapeMarkdown
@Parameter(property="mavanagaiata.contributors.escapeMarkdown", defaultValue="false") boolean escapeMarkdown -
header
@Parameter(property="mavanagaiata.contributors.header", defaultValue="Contributors\n============\n") String headerThe header to print above the changelog -
mailMap
-
outputFile
The file to write the contributors list to -
showCounts
@Parameter(property="mavanagaiata.contributors.showCounts", defaultValue="true") boolean showCountsWhether the number of contributions should be listed -
showEmail
@Parameter(property="mavanagaiata.contributors.showEmail", defaultValue="false") boolean showEmailWhether the email addresses of contributors should be listed -
sort
The method used to sort contributorsAvailable values are
count
,date
andname
.
-
-
Konstruktordetails
-
ContributorsMojo
public ContributorsMojo()
-
-
Methodendetails
-
initConfiguration
protected void initConfiguration()Selects the attribute to use for sorting contributors- Setzt außer Kraft:
initConfiguration
in KlasseAbstractGitOutputMojo
-
writeOutput
Walks through the history of the currently checked out branch of the Git repository and builds a list of contributors from the authors of the commits.- Angegeben von:
writeOutput
in KlasseAbstractGitOutputMojo
- Parameter:
repository
- The repository the mojo is running in- Löst aus:
MavanagaiataMojoException
- if retrieving information from the Git repository fails
-
escapeName
Returns an escaped form of the contributor nameDepending on the
escapeHtml
andescapeMarkdown
fields this methods escapes HTML tags and/or Markdown link brackets.- Parameter:
name
- The name of the contributor- Gibt zurück:
- An escaped form of the contributor
-
getOutputFile
Returns the output file for the generated contributors list- Angegeben von:
getOutputFile
in KlasseAbstractGitOutputMojo
- Gibt zurück:
- The output file for the generated contributors list
-
setOutputFile
Sets the output file for the generated contributors list- Angegeben von:
setOutputFile
in KlasseAbstractGitOutputMojo
- Parameter:
outputFile
- The output file for the generated contributors list
-