@Mojo(name="generate-changelog",
defaultPhase=GENERATE_RESOURCES,
aggregator=true)
public class ChangelogMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected String |
applicableCommitPattern
Regex pattern which is used to filter unwanted commits, i.e.
|
protected String |
commitFormat
Additional java
String.format(commitMessage, commitFormat) which is used to customize changelog entry |
static List<MessageFilter> |
filters |
protected String |
lastTag
Predefined git tag which is used for comparing.
|
protected String |
lastTagFormat
Defines format (for java
String.format(lastTagFormat, lastTagPattern)) which is used to customize git tag if differs from lastTagPattern |
protected String |
lastTagPattern
Regex pattern which is used to match line with latest release version (tag).
|
protected String |
mergeRequestReplacement
Replacement string which will be used with
mergeRequestReplacePattern. |
protected String |
mergeRequestReplacePattern
Regex pattern which is used to add merge request numbers to the messages.
|
protected String |
pathToChangelog
Path to changelog file
|
static List<MessageTransformer> |
transformers |
protected String |
unreleasedRowPattern
Regex pattern which is used to match line with 'Unreleased' token
|
| Constructor and Description |
|---|
ChangelogMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
ChangelogConfiguration |
getChangelogConfiguration() |
@Parameter(defaultValue="CHANGELOG.md") protected String pathToChangelog
@Parameter protected String lastTag
lastTagPattern may be used to parse latest tag dynamically.@Parameter protected String lastTagPattern
lastTag may be used if tag is predefined.@Parameter(defaultValue="%s") protected String lastTagFormat
String.format(lastTagFormat, lastTagPattern)) which is used to customize git tag if differs from lastTagPattern@Parameter(required=true) protected String applicableCommitPattern
@Parameter(defaultValue="%s") protected String commitFormat
String.format(commitMessage, commitFormat) which is used to customize changelog entry@Parameter(required=true) protected String unreleasedRowPattern
@Parameter protected String mergeRequestReplacePattern
mergeRequestReplacement.
For example "(])" to add merge requests before first "]" like [ABC-123] Text -> [ABC-123 321!] Text.@Parameter(defaultValue=" MR#$1") protected String mergeRequestReplacement
mergeRequestReplacePattern. Must contain token "MR#", which will be replaced by merge request numberpublic static final List<MessageFilter> filters
public static final List<MessageTransformer> transformers
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionpublic ChangelogConfiguration getChangelogConfiguration()
Copyright © 2017. All rights reserved.