Skip to content

Commit e18d6a7

Browse files
committed
More logging of extended variables from CLI #24
1 parent 1cd9f65 commit e18d6a7

12 files changed

+51
-6
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Changelog of Git Changelog Maven plugin.
55
## Unreleased
66
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
77

8+
**Formatting code after merge #24**
9+
10+
11+
[1cd9f65ba4b21d8](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/1cd9f65ba4b21d8) Tomas Bjerre *2021-01-16 06:21:39*
12+
813
**Allow to pass extendedVariables using maven cli #24**
914

1015

git-changelog-maven-plugin-example/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Changelog of Git Changelog Maven plugin.
55
## Unreleased
66
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
77

8+
**Formatting code after merge #24**
9+
10+
11+
[1cd9f65ba4b21d8](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/1cd9f65ba4b21d8) Tomas Bjerre *2021-01-16 06:21:39*
12+
813
**Allow to pass extendedVariables using maven cli #24**
914

1015

git-changelog-maven-plugin-example/CHANGELOG_custom.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Changelog of Git Changelog Maven plugin.
44

55
## Unreleased
66
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
7+
Formatting code after merge #24
8+
79
Allow to pass extendedVariables using maven cli #24
810

911

git-changelog-maven-plugin-example/CHANGELOG_ignoreCommitsOlderThan.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Changelog of Git Changelog Maven plugin.
44

55
## Unreleased
66
### GitHub
7+
Formatting code after merge #24 *2021-01-16 06:21:39*
8+
79
Allow to pass extendedVariables using maven cli #24 *2021-01-16 06:18:56*
810

911

git-changelog-maven-plugin-example/CHANGELOG_ignoreCommitsWithoutIssue.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Changelog of Git Changelog Maven plugin.
44

55
## Unreleased
66
### GitHub
7+
Formatting code after merge #24 *2021-01-16 06:21:39*
8+
79
Allow to pass extendedVariables using maven cli #24 *2021-01-16 06:18:56*
810

911

git-changelog-maven-plugin-example/CHANGELOG_inline.md

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ Changelog of Git Changelog Maven plugin.
55
## Unreleased
66
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
77

8+
[1cd9f65ba4b21d8](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/1cd9f65ba4b21d8) Tomas Bjerre *2021-01-16 06:21:39*
9+
10+
Formatting code after merge #24
11+
812
[b4a1ccc72a3a1ce](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/b4a1ccc72a3a1ce) Volker Hochstein *2021-01-16 06:18:56*
913

1014
Allow to pass extendedVariables using maven cli #24

git-changelog-maven-plugin-example/CHANGELOG_jira.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Changelog of Git Changelog Maven plugin.
55
## Unreleased
66
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
77

8+
**Formatting code after merge #24**
9+
10+
11+
[1cd9f65ba4b21d8](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/1cd9f65ba4b21d8) Tomas Bjerre *2021-01-16 06:21:39*
12+
813
**Allow to pass extendedVariables using maven cli #24**
914

1015

git-changelog-maven-plugin-example/CHANGELOG_minimal.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Changelog of Git Changelog Maven plugin.
55
## Unreleased
66
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
77

8+
**Formatting code after merge #24**
9+
10+
11+
[1cd9f65ba4b21d8](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/1cd9f65ba4b21d8) Tomas Bjerre *2021-01-16 06:21:39*
12+
813
**Allow to pass extendedVariables using maven cli #24**
914

1015

git-changelog-maven-plugin-example/CHANGELOG_mixed.md

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Add support for pathfilter *17:17:05*
3636

3737

3838
### GitHub
39+
Formatting code after merge #24 *06:21:39*
40+
3941
Allow to pass extendedVariables using maven cli #24 *06:18:56*
4042

4143

git-changelog-maven-plugin-example/CHANGELOG_settings.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Changelog of Git Changelog Maven plugin.
55
## Next release
66
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
77

8+
**Formatting code after merge #24**
9+
10+
11+
[1cd9f65ba4b21d8](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/1cd9f65ba4b21d8) Tomas Bjerre *2021-01-16 06:21:39*
12+
813
**Allow to pass extendedVariables using maven cli #24**
914

1015

git-changelog-maven-plugin-example/CHANGELOG_templatefile.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Changelog of Git Changelog Maven plugin.
55
## Unreleased
66
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
77

8+
**Formatting code after merge #24**
9+
10+
11+
[1cd9f65ba4b21d8](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/1cd9f65ba4b21d8) Tomas Bjerre *2021-01-16 06:21:39*
12+
813
**Allow to pass extendedVariables using maven cli #24**
914

1015

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

+9-6
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public void execute() throws MojoExecutionException {
141141
return;
142142
}
143143
try {
144-
Map<String, String> extendedVariablesCliAsMap = this.convertExtendedVariablesCli2Map();
144+
final Map<String, String> extendedVariablesCliAsMap = this.convertExtendedVariablesCli2Map();
145145
this.extendedVariables.putAll(extendedVariablesCliAsMap);
146146

147147
GitChangelogApi builder;
@@ -283,12 +283,15 @@ private boolean isSupplied(final Map<?, ?> parameter) {
283283
}
284284

285285
private Map<String, String> convertExtendedVariablesCli2Map() {
286-
Map<String, String> map = new HashMap<>();
286+
final Map<String, String> map = new HashMap<>();
287287
if (this.extendedVariablesCli != null) {
288-
for (int i = 0; i < this.extendedVariablesCli.length; i++) {
289-
String entry = this.extendedVariablesCli[i];
290-
int equalsPosition = entry.indexOf("=");
291-
map.put(entry.substring(0, equalsPosition), entry.substring(equalsPosition + 1));
288+
this.getLog().info("Extended variables:");
289+
for (final String entry : this.extendedVariablesCli) {
290+
final int equalsPosition = entry.indexOf("=");
291+
final String variable = entry.substring(0, equalsPosition);
292+
final String value = entry.substring(equalsPosition + 1);
293+
this.getLog().info(variable + " = " + value);
294+
map.put(variable, value);
292295
}
293296
}
294297
return map;

0 commit comments

Comments
 (0)