Skip to content

Commit 1cd9f65

Browse files
committed
Formatting code after merge #24
1 parent b4a1ccc commit 1cd9f65

12 files changed

+96
-14
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
Changelog of Git Changelog Maven plugin.
44

5+
## Unreleased
6+
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
7+
8+
**Allow to pass extendedVariables using maven cli #24**
9+
10+
11+
[b4a1ccc72a3a1ce](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/b4a1ccc72a3a1ce) Volker Hochstein *2021-01-16 06:18:56*
12+
13+
514
## 1.64
615
### GitHub [#21](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/21) Goal not marked as Thread-safe
716

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

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
Changelog of Git Changelog Maven plugin.
44

5+
## Unreleased
6+
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
7+
8+
**Allow to pass extendedVariables using maven cli #24**
9+
10+
11+
[b4a1ccc72a3a1ce](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/b4a1ccc72a3a1ce) Volker Hochstein *2021-01-16 06:18:56*
12+
13+
514
## 1.64
615
### GitHub [#21](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/21) Goal not marked as Thread-safe
716

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

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Changelog of Git Changelog Maven plugin.
44

5+
## Unreleased
6+
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
7+
Allow to pass extendedVariables using maven cli #24
8+
9+
10+
511
## git-changelog-maven-plugin-1.64
612
### GitHub [#21](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/21) Goal not marked as Thread-safe
713
Mark as thread safe #21

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

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Changelog of Git Changelog Maven plugin.
44

5+
## Unreleased
6+
### GitHub
7+
Allow to pass extendedVariables using maven cli #24 *2021-01-16 06:18:56*
8+
9+
10+
511
## git-changelog-maven-plugin-1.64
612
### GitHub
713
Mark as thread safe #21 *2020-12-14 17:13:21*

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

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Changelog of Git Changelog Maven plugin.
44

5+
## Unreleased
6+
### GitHub
7+
Allow to pass extendedVariables using maven cli #24 *2021-01-16 06:18:56*
8+
9+
10+
511
## git-changelog-maven-plugin-1.64
612
### GitHub
713
Mark as thread safe #21 *2020-12-14 17:13:21*

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

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
Changelog of Git Changelog Maven plugin.
44

5+
## Unreleased
6+
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
7+
8+
[b4a1ccc72a3a1ce](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/b4a1ccc72a3a1ce) Volker Hochstein *2021-01-16 06:18:56*
9+
10+
Allow to pass extendedVariables using maven cli #24
11+
12+
513
## git-changelog-maven-plugin-1.64
614
### GitHub [#21](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/21) Goal not marked as Thread-safe
715

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

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
Changelog of Git Changelog Maven plugin.
44

5+
## Unreleased
6+
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
7+
8+
**Allow to pass extendedVariables using maven cli #24**
9+
10+
11+
[b4a1ccc72a3a1ce](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/b4a1ccc72a3a1ce) Volker Hochstein *2021-01-16 06:18:56*
12+
13+
514
## 1.64
615
### GitHub [#21](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/21) Goal not marked as Thread-safe
716

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

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
Changelog of Git Changelog Maven plugin.
44

5+
## Unreleased
6+
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
7+
8+
**Allow to pass extendedVariables using maven cli #24**
9+
10+
11+
[b4a1ccc72a3a1ce](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/b4a1ccc72a3a1ce) Volker Hochstein *2021-01-16 06:18:56*
12+
13+
514
## git-changelog-maven-plugin-1.64
615
### GitHub [#21](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/21) Goal not marked as Thread-safe
716

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

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ Add support for pathfilter *17:17:05*
3535
Mark as thread safe #21 *17:13:21*
3636

3737

38+
### GitHub
39+
Allow to pass extendedVariables using maven cli #24 *06:18:56*
40+
41+
3842
### GitHub
3943
Documentation and more configuration available in pom #3 *07:15:44*
4044

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

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
Changelog of Git Changelog Maven plugin.
44

5+
## Next release
6+
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
7+
8+
**Allow to pass extendedVariables using maven cli #24**
9+
10+
11+
[b4a1ccc72a3a1ce](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/b4a1ccc72a3a1ce) Volker Hochstein *2021-01-16 06:18:56*
12+
13+
514
## 1.64
615
### GitHub [#21](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/21) Goal not marked as Thread-safe
716

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

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
Changelog of Git Changelog Maven plugin.
44

5+
## Unreleased
6+
### GitHub [#24](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/24) Passing extendedVariables Property using mvn -D Commandline Option
7+
8+
**Allow to pass extendedVariables using maven cli #24**
9+
10+
11+
[b4a1ccc72a3a1ce](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/b4a1ccc72a3a1ce) Volker Hochstein *2021-01-16 06:18:56*
12+
13+
514
## 1.64
615
### GitHub [#21](https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/21) Goal not marked as Thread-safe
716

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

+12-14
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
import java.io.File;
88
import java.util.Date;
9+
import java.util.HashMap;
910
import java.util.List;
1011
import java.util.Map;
11-
import java.util.HashMap;
1212
import org.apache.maven.plugin.AbstractMojo;
1313
import org.apache.maven.plugin.MojoExecutionException;
1414
import org.apache.maven.plugins.annotations.Mojo;
@@ -37,7 +37,7 @@ public class GitChangelogMojo extends AbstractMojo {
3737
@Parameter(property = "extendedVariables", required = false)
3838
private Map extendedVariables;
3939

40-
//map variables cannot be passed through maven cli use this property as a workaround
40+
// map variables cannot be passed through maven cli use this property as a workaround
4141
@Parameter(property = "extendedVariablesCli", required = false)
4242
private String[] extendedVariablesCli;
4343

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

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

285285
private Map<String, String> convertExtendedVariablesCli2Map() {
286-
Map<String, String> map = new HashMap<>();
287-
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(
292-
entry.substring( 0, equalsPosition ),
293-
entry.substring( equalsPosition + 1 ) );
294-
}
295-
}
296-
return map;
286+
Map<String, String> map = new HashMap<>();
287+
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));
292+
}
293+
}
294+
return map;
297295
}
298296
}

0 commit comments

Comments
 (0)