Skip to content

Commit e682c28

Browse files
author
David Nicklin
committed
Add extendedVariables property
1 parent 1e91537 commit e682c28

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main/java/se/bjurr/gitchangelog/plugin/GitChangelogMojo.java

+12
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import java.io.File;
88
import java.util.Date;
99
import java.util.List;
10+
import java.util.Map;
1011
import org.apache.maven.plugin.AbstractMojo;
1112
import org.apache.maven.plugin.MojoExecutionException;
1213
import org.apache.maven.plugins.annotations.Mojo;
@@ -32,6 +33,9 @@ public class GitChangelogMojo extends AbstractMojo {
3233
@Parameter(property = "settingsFile", required = false)
3334
private String settingsFile;
3435

36+
@Parameter(property = "extendedVariables", required = false)
37+
private Map extendedVariables;
38+
3539
@Parameter(property = "templateFile", required = false)
3640
private String templateFile;
3741

@@ -135,6 +139,10 @@ public void execute() throws MojoExecutionException {
135139
builder.withSettings(new File(settingsFile).toURI().toURL());
136140
}
137141

142+
if (isSupplied(extendedVariables)) {
143+
builder.withExtendedVariables(extendedVariables);
144+
}
145+
138146
if (isSupplied(toRef)) {
139147
builder.withToRef(toRef);
140148
}
@@ -254,4 +262,8 @@ public void execute() throws MojoExecutionException {
254262
private boolean isSupplied(String parameter) {
255263
return !isNullOrEmpty(parameter);
256264
}
265+
266+
private boolean isSupplied(final Map<?, ?> parameter) {
267+
return parameter != null && !parameter.isEmpty();
268+
}
257269
}

0 commit comments

Comments
 (0)