Skip to content

Commit 9821efc

Browse files
authored
Merge pull request #414 from TheSnoozer/minor-updates
Fixes #410 / #185 / #403 / #415
2 parents a276551 + 9582d7c commit 9821efc

File tree

13 files changed

+534
-223
lines changed

13 files changed

+534
-223
lines changed

docs/using-the-plugin.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ It's really simple to setup this plugin; below is a sample pom that you may base
271271
Please note that the strings here are Java regexes ({@code .*} is globbing, not plain {@code *}).
272272
273273
This feature was implemented in response to [this issue](https://github.com/git-commit-id/maven-git-commit-id-plugin/issues/91), so if you're curious about the use-case, check that issue.
274+
275+
Prior to version 3.0.0 the plugin used the 'naive' approach to ask for all properties and then apply filtering. However with the growing numbers of properties each property eat more and more of execution time that will be filtered out afterwards.
276+
With 3.0.0 this behaviour was readjusted to a 'selective running' approach whereby the plugin will not even try to get the property when excluded. Such behaviour can result in an overall reduced execution time of the plugin (see https://github.com/git-commit-id/maven-git-commit-id-plugin/issues/408 for details).
274277
-->
275278
<excludeProperties>
276279
<!-- <excludeProperty>git.user.*</excludeProperty> -->
@@ -290,6 +293,10 @@ It's really simple to setup this plugin; below is a sample pom that you may base
290293
as well as {@code email} properties into the resulting files.
291294
292295
Please note that the strings here are Java regexes ({@code .*} is globbing, not plain {@code *}).
296+
297+
298+
Prior to version 3.0.0 the plugin used the 'naive' approach to ask for all properties and then apply filtering. However with the growing numbers of properties each property eat more and more of execution time that will be filtered out afterwards.
299+
With 3.0.0 this behaviour was readjusted to a 'selective running' approach whereby the plugin will not even try to get the property when included. Such behaviour can result in an overall reduced execution time of the plugin (see https://github.com/git-commit-id/maven-git-commit-id-plugin/issues/408 for details).
293300
-->
294301
<includeOnlyProperties>
295302
<!-- <includeOnlyProperty>^git.commit.id.full$</includeOnlyProperty> -->
@@ -548,6 +555,9 @@ It's really simple to setup this plugin; below is a sample pom that you may base
548555
549556
Please note that for security purposes not all references might be allowed as configuration.
550557
If you have a specific use-case that is currently not white listed feel free to file an issue.
558+
559+
Note with version 3.0.0:
560+
When an user uses the `evaluateOnCommit` property to gather the branch for an arbitrary commit (really anything besides the default `HEAD`) this plugin will perform a `git branch --points-at` which might return a comma separated list of branch names that points to the specified commit.
551561
-->
552562
<evaluateOnCommit>HEAD</evaluateOnCommit>
553563

@@ -565,6 +575,18 @@ It's really simple to setup this plugin; below is a sample pom that you may base
565575
detached head state and therefore a commit id as branch name.
566576
-->
567577
<useBranchNameFromBuildEnvironment>true</useBranchNameFromBuildEnvironment>
578+
579+
<!-- @since 3.0.0 -->
580+
<!--
581+
Default (optional):
582+
true
583+
584+
Explanation:
585+
When set to `true` this plugin will try to expose the generated properties into `System.getProperties()`.
586+
Set to {@code 'false'} to avoid this exposure.
587+
Note that parameters provided via command-line (e.g. `-Dgit.commit.id=value`) still have precedence.
588+
-->
589+
<injectIntoSysProperties>true</injectIntoSysProperties>
568590
</configuration>
569591
</plugin>
570592
<!-- END OF GIT COMMIT ID PLUGIN CONFIGURATION -->
@@ -640,7 +662,7 @@ Generated properties
640662

641663
| generated property | description |
642664
| ----------------------------- | ----------------------------------------|
643-
|`git.branch` | Represents the current branch name. Falls back to commit-id for detached HEAD. |
665+
|`git.branch` | Represents the current branch name. Falls back to commit-id for detached HEAD. Note: When an user uses the `evaluateOnCommit` property to gather the branch for an arbitrary commit (really anything besides the default `HEAD`) this plugin will perform a `git branch --points-at` which might return a comma separated list of branch names that points to the specified commit. |
644666
|`git.build.number.unique` | Represents a system wide unique build number (see notes below). |
645667
|`git.build.host` | Represents the hostname where the properties have been generated. |
646668
|`git.build.time` | Represents the (formated) timestamp when the last build was executed. If written to the git.properties file represents the latest build time when that file was written / updated. |

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959

6060
<jgit.version>5.2.0.201812061821-r</jgit.version>
6161
<junit.version>5.3.1</junit.version>
62-
<mockito.version>2.23.4</mockito.version>
62+
<mockito.version>2.27.0</mockito.version>
6363

6464
<fest-assert.version>1.4</fest-assert.version>
6565
</properties>
@@ -107,14 +107,14 @@
107107
<dependency>
108108
<groupId>com.google.guava</groupId>
109109
<artifactId>guava</artifactId>
110-
<version>27.0.1-jre</version>
110+
<version>27.1-jre</version>
111111
</dependency>
112112

113113
<!-- HttpClient -->
114114
<dependency>
115115
<groupId>org.apache.httpcomponents</groupId>
116116
<artifactId>httpclient</artifactId>
117-
<version>4.5.6</version>
117+
<version>4.5.8</version>
118118
</dependency>
119119

120120
<!-- JGit -->
@@ -142,7 +142,7 @@
142142
<dependency>
143143
<groupId>org.codehaus.plexus</groupId>
144144
<artifactId>plexus-utils</artifactId>
145-
<version>3.1.1</version>
145+
<version>3.2.0</version>
146146
<scope>test</scope>
147147
</dependency>
148148

0 commit comments

Comments
 (0)