Klasse 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.
Sebastian Staudt
  • Felddetails


      private static final Map<CharSequence,CharSequence> MARKDOWN_TRANSLATION_MAP

      private static final org.apache.commons.text.translate.CharSequenceTranslator MARKDOWN_TRANSLATOR
    • contributorPrefix

      @Parameter(property="mavanagaiata.contributors.contributorPrefix", defaultValue=" * ") String contributorPrefix
      The 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
    • mailMap

      private MailMap mailMap
    • outputFile

      @Parameter(property="mavanagaiata.contributors.outputFile") File outputFile
      The file to write the contributors list to
    • showCounts

      @Parameter(property="mavanagaiata.contributors.showCounts", defaultValue="true") boolean showCounts
      Whether the number of contributions should be listed
    • showEmail

      @Parameter(property="mavanagaiata.contributors.showEmail", defaultValue="false") boolean showEmail
      Whether the email addresses of contributors should be listed
    • sort

      @Parameter(property="mavanagaiata.contributors.sort", defaultValue="count") String sort
      The method used to sort contributors

      Available values are count, date and name.

  • Konstruktordetails

    • ContributorsMojo

      public ContributorsMojo()
  • Methodendetails

    • initConfiguration

      protected void initConfiguration()
      Selects the attribute to use for sorting contributors
      Setzt außer Kraft:
      initConfiguration in Klasse AbstractGitOutputMojo
    • writeOutput

      protected void writeOutput(GitRepository repository) throws MavanagaiataMojoException
      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 Klasse AbstractGitOutputMojo
      repository - The repository the mojo is running in
      Löst aus:
      MavanagaiataMojoException - if retrieving information from the Git repository fails
    • escapeName

      private String escapeName(String name)
      Returns an escaped form of the contributor name

      Depending on the escapeHtml and escapeMarkdown fields this methods escapes HTML tags and/or Markdown link brackets.

      name - The name of the contributor
      Gibt zurück:
      An escaped form of the contributor
    • getOutputFile

      public File getOutputFile()
      Returns the output file for the generated contributors list
      Angegeben von:
      getOutputFile in Klasse AbstractGitOutputMojo
      Gibt zurück:
      The output file for the generated contributors list
    • setOutputFile

      public void setOutputFile(File outputFile)
      Sets the output file for the generated contributors list
      Angegeben von:
      setOutputFile in Klasse AbstractGitOutputMojo
      outputFile - The output file for the generated contributors list