File tree 5 files changed +76
-6
lines changed
git-changelog-maven-plugin-example
src/main/java/se/bjurr/gitchangelog/plugin
5 files changed +76
-6
lines changed Original file line number Diff line number Diff line change 3
3
Changelog of Git Changelog Maven plugin.
4
4
5
5
## Next release
6
+ ### GitHub [ #2 ] ( https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/2 ) Allow for template to be added directly in pom.xml
7
+
8
+ [ f2260d8c648971f] ( https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/f2260d8c648971f ) Tomas Bjerre * 2015-12-20 17:29:08*
9
+
10
+ Template can be configured directly in the pom
11
+
12
+
13
+ ### Other changes
14
+
15
+ [ 60c9851e33217e2] ( https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/60c9851e33217e2 ) Tomas Bjerre * 2015-12-10 17:11:56*
16
+
17
+ Using lib 1.18
18
+
19
+
20
+ ## git-changelog-maven-plugin-1.9
6
21
### GitHub [ #1 ] ( https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/1 ) Update to lates lib version
7
22
8
- [ c2fbe45b2a1393d ] ( https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/c2fbe45b2a1393d ) Tomas Bjerre * 2015-12-06 07:36:39 *
23
+ [ 012e716f4ac9081 ] ( https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/012e716f4ac9081 ) Tomas Bjerre * 2015-12-06 07:37:23 *
9
24
10
25
Using lib 1.17
11
26
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Here is and example that will generate a CHANGELOG.md. There is also a running e
12
12
<plugin>
13
13
<groupId>se.bjurr.gitchangelog</groupId>
14
14
<artifactId>git-changelog-maven-plugin</artifactId>
15
- <version>1.9 </version>
15
+ <version>1.10 </version>
16
16
<executions>
17
17
<execution>
18
18
<id>GenerateGitChangelog</id>
Original file line number Diff line number Diff line change 3
3
Changelog of Git Changelog Maven plugin.
4
4
5
5
## Next release
6
+ ### GitHub [ #2 ] ( https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/2 ) Allow for template to be added directly in pom.xml
7
+
8
+ [ f2260d8c648971f] ( https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/f2260d8c648971f ) Tomas Bjerre * 2015-12-20 17:29:08*
9
+
10
+ Template can be configured directly in the pom
11
+
12
+
13
+ ### Other changes
14
+
15
+ [ 60c9851e33217e2] ( https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/60c9851e33217e2 ) Tomas Bjerre * 2015-12-10 17:11:56*
16
+
17
+ Using lib 1.18
18
+
19
+
20
+ ## git-changelog-maven-plugin-1.9
6
21
### GitHub [ #1 ] ( https://github.com/tomasbjerre/git-changelog-maven-plugin/issues/1 ) Update to lates lib version
7
22
8
- [ c2fbe45b2a1393d ] ( https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/c2fbe45b2a1393d ) Tomas Bjerre * 2015-12-06 07:36:39 *
23
+ [ 012e716f4ac9081 ] ( https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/012e716f4ac9081 ) Tomas Bjerre * 2015-12-06 07:37:23 *
9
24
10
25
Using lib 1.17
11
26
Original file line number Diff line number Diff line change @@ -26,9 +26,40 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
26
26
</goals >
27
27
<configuration >
28
28
<toRef >refs/heads/master</toRef >
29
- <templateFile >changelog.mustache</templateFile >
30
29
<settingsFile >changelog.json</settingsFile >
31
-
30
+
31
+ <!-- Template from file //-->
32
+ <!-- templateFile>changelog.mustache</templateFile //-->
33
+
34
+ <!-- Template here //-->
35
+ <!-- templateContent>
36
+ < {{title}}
46
+ {{/hasLink}}
47
+ {{^hasLink}}
48
+ ### {{name}}
49
+ {{/hasLink}}
50
+
51
+ {{#commits}}
52
+ [{{hash}}](https://github.com/tomasbjerre/git-changelog-maven-plugin/commit/{{hash}}) {{authorName}} *{{commitTime}}*
53
+
54
+ {{{message}}}
55
+
56
+ {{/commits}}
57
+
58
+ {{/issues}}
59
+ {{/tags}}
60
+ ]]>
61
+ </templateContent//-->
62
+
32
63
<!-- A file on filesystem //-->
33
64
<filePath >CHANGELOG.md</filePath >
34
65
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ public class GitChangelogMojo extends AbstractMojo {
30
30
private String settingsFile ;
31
31
@ Parameter (property = "templateFile" , required = false )
32
32
private String templateFile ;
33
+ @ Parameter (property = "templateContent" , required = false )
34
+ private String templateContent ;
33
35
@ Parameter (property = "filePath" , required = false )
34
36
private String filePath ;
35
37
@@ -48,9 +50,16 @@ public void execute() throws MojoExecutionException {
48
50
GitChangelogApi builder ;
49
51
builder = gitChangelogApiBuilder () //
50
52
.withSettings (new File (settingsFile ).toURI ().toURL ()) //
51
- .withTemplatePath (templateFile ) //
52
53
.withToRef (toRef );
53
54
55
+ if (!isNullOrEmpty (templateFile )) {
56
+ builder //
57
+ .withTemplatePath (templateFile );
58
+ }
59
+ if (!isNullOrEmpty (templateContent )) {
60
+ builder //
61
+ .withTemplateContent (templateContent );
62
+ }
54
63
if (!isNullOrEmpty (fromCommit )) {
55
64
builder //
56
65
.withFromCommit (fromCommit );
You can’t perform that action at this time.
0 commit comments