Skip to content

Commit ac5e27b

Browse files
committed
readme updated with info about latest release with native git
1 parent 1c24b6f commit ac5e27b

File tree

3 files changed

+330
-19
lines changed

3 files changed

+330
-19
lines changed

README.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ A detailed description of using the pluing is available in the <a href="https://
3535

3636
Versions
3737
--------
38-
The current version is **2.1.9**.
38+
The current version is **2.1.10**.
3939

4040
You can check the available versions by visiting [search.maven.org](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22pl.project13.maven%22%20AND%20a%3A%22git-commit-id-plugin%22), though using the newest is obviously the best choice.
4141

@@ -70,7 +70,7 @@ It's really simple to setup this plugin; below is a sample pom that you may base
7070
<packaging>war</packaging>
7171
<version>0.1</version>
7272
<name>my-git-plugin-sample-app</name>
73-
<url>http://www.blog.project13.pl</url>
73+
<url>http://www.project13.pl</url>
7474

7575
<dependencies />
7676

@@ -93,7 +93,7 @@ It's really simple to setup this plugin; below is a sample pom that you may base
9393
<plugin>
9494
<groupId>pl.project13.maven</groupId>
9595
<artifactId>git-commit-id-plugin</artifactId>
96-
<version>2.1.9</version>
96+
<version>2.1.10</version>
9797
<executions>
9898
<execution>
9999
<goals>
@@ -112,13 +112,16 @@ It's really simple to setup this plugin; below is a sample pom that you may base
112112
<!-- false is default here, it prints some more information during the build -->
113113
<verbose>false</verbose>
114114

115-
<!-- @since 2.1.9 -->
116-
<!--
117-
false is default here, if set to true it uses native GIT excutable for
118-
better performance (it must be installed in system and available in system PATH)
119-
115+
<!-- @since 2.1.10 -->
116+
<!--
117+
false is default here, if set to true it uses native `git` excutable for extracting all data.
118+
This usualy has better performance than the default (jgit) implemenation, but requires you to
119+
have git available as executable for the build as well as *might break unexpectedly* when you
120+
upgrade your system-wide git installation.
121+
122+
As rule of thumb - stay on `jgit` (keep this `false`) until you notice performance problems.
120123
-->
121-
<useNativeGit>false</useNativeGit>
124+
<useNativeGit>false</useNativeGit>
122125

123126
<!--
124127
If you'd like to tell the plugin where your .git directory is,
@@ -531,6 +534,7 @@ Optional parameters:
531534
* **failOnNoGitDirectory** - `(default: true)` *(available since v2.0.4)* - Specify whether the plugin should fail when a .git directory can not be found. When set to false and no .git directory is found the plugin will skip execution.
532535
* **skip** - `(default: false)` *(available since v2.1.8)* - Skip the plugin execution completely.
533536
* **excludeProperties** - `(default: empty)` *(available since v2.1.9)* - Allows to filter out properties that you *don't* want to expose. This feature was implemented in response to [this issue](https://github.com/ktoso/maven-git-commit-id-plugin/issues/91), so if you're curious about the use-case, check that issue.
537+
* **useNativeGit** - `(default: false)` *(available since v2.1.10)* - Uses the native `git` binary instead of the custom `jgit` implementation shipped with this plugin to obtain all information. Although this should usualy give your build some performance boost, it may randomly break if you upgrade your git version and it decides to print information in a different format suddenly. As rule of thumb, keep using the default `jgit` implementation (keep this option set to `false`) until you notice performance problems within your build (usualy when you have *hundreds* of maven modules).
534538

535539
**gitDescribe**:
536540
Worth pointing out is, that git-commit-id tries to be 1-to-1 compatible with git's plain output, even though the describe functionality has been reimplemented manually using JGit (you don't have to have a git executable to use the plugin). So if you're familiar with [git-describe](https://github.com/ktoso/maven-git-commit-id-plugin#git-describe---short-intro-to-an-awesome-command), you probably can skip this section, as it just explains the same options that git provides.
@@ -553,19 +557,19 @@ I'd like to give a big thanks to some of these folks, for their suggestions and
553557
* @mostr - for bugfixes and a framework to do integration testing,
554558
* @fredcooke - for consistent feedback and suggestions,
555559
* @MrOnion - for a small yet fast bugfix,
556-
* @TheSnoozer - for helping out others on issues as well as his contributions,
560+
* @cardil and @TheSnoozer - for helping with getting the native git support shipped,
557561
* ... many others - thank you for your contributions,
558562
* ... you! - for using the plugin :-)
559563

560564
Notable happy users
561565
===================
562566

563-
* [neo4j](http://www.neo4j.org/) graph database
564-
* foundationdb.com
565-
* [Spring Boot](http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready-git-commit-information)
566-
* Akamai
567-
* others I know of but shouldn't tell ;-)
568-
* many others I don't know of
567+
* [neo4j](http://www.neo4j.org/) graph database
568+
* [foundationdb](http://foundationdb.com) – another open source database
569+
* [Spring Boot](http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready-git-commit-information) – yes, the upstream Spring project is using us
570+
* Akamai, Sabre,
571+
* others I know of, but can't tell,
572+
* many others I don't know of.
569573

570574
License
571575
=======
@@ -579,7 +583,4 @@ and maybe someone else has some idea or would like to upvote your issue.
579583

580584
In all other cases, feel free to contact me by sending an email to `[email protected]`, I'll definitely write back. :-)
581585

582-
583-
584586
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/ktoso/maven-git-commit-id-plugin/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
585-

pom.xml.releaseBackup

Lines changed: 302 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,302 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2+
<modelVersion>4.0.0</modelVersion>
3+
4+
<parent>
5+
<groupId>org.sonatype.oss</groupId>
6+
<artifactId>oss-parent</artifactId>
7+
<version>6</version>
8+
</parent>
9+
10+
<groupId>pl.project13.maven</groupId>
11+
<artifactId>git-commit-id-plugin</artifactId>
12+
<packaging>maven-plugin</packaging>
13+
<version>2.1.10-SNAPSHOT</version>
14+
<name>Git Commit Id Plugin Maven Mojo</name>
15+
<description>
16+
git-commit-id-plugin is a plugin quite similar to
17+
https://fisheye.codehaus.org/browse/mojo/tags/buildnumber-maven-plugin-1.0-beta-4 for example but as buildnumber
18+
only supports svn (which is very sad) and cvs (which is even more sad).
19+
This plugin makes basic repository information available through maven resources. This can be used to display
20+
"what version is this?" or "who has deployed this and when, from which branch?" information at runtime - making
21+
it easy to find things like "oh, that isn't deployed yet, I'll test it tomorrow" and making both testers and
22+
developers life easier.
23+
24+
The data currently exported is like this (that's the end effect from the GitRepositoryState Bean):
25+
{
26+
"branch" : "testing-maven-git-plugin",
27+
"commitTime" : "06.01.1970 @ 16:16:26 CET",
28+
"commitId" : "787e39f61f99110e74deed68ab9093088d64b969",
29+
"commitUserName" : "Konrad Malawski",
30+
"commitUserEmail" : "[email protected]",
31+
"commitMessageFull" : "releasing my fun plugin :-) + fixed some typos + cleaned up directory structure + added
32+
license etc",
33+
"commitMessageShort" : "releasing my fun plugin :-)",
34+
"buildTime" : "06.01.1970 @ 16:17:53 CET",
35+
"buildUserName" : "Konrad Malawski",
36+
"buildUserEmail" : "[email protected]"
37+
}
38+
39+
Note that the data is exported via maven resource filtering and is really easy to use with spring -
40+
which I've explained in detail in this readme https://github.com/ktoso/maven-git-commit-id-plugin
41+
</description>
42+
<url>http://www.blog.project13.pl</url>
43+
44+
<developers>
45+
<developer>
46+
<id>ktoso</id>
47+
<name>Konrad Malawski</name>
48+
<email>[email protected]</email>
49+
<organization>Project13.pl</organization>
50+
<url>http://blog.project13.pl</url>
51+
</developer>
52+
</developers>
53+
54+
<prerequisites>
55+
<maven>[${maven-plugin-api.version},)</maven>
56+
</prerequisites>
57+
58+
<licenses>
59+
<license>
60+
<name>GNU Lesser General Public License 3.0</name>
61+
<url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
62+
</license>
63+
</licenses>
64+
65+
<scm>
66+
<url>[email protected]/ktoso/maven-git-commit-id-plugin.git</url>
67+
<connection>scm:git:https://github.com/ktoso/maven-git-commit-id-plugin</connection>
68+
<developerConnection>scm:git:[email protected]:ktoso/maven-git-commit-id-plugin.git</developerConnection>
69+
</scm>
70+
71+
<properties>
72+
<maven-plugin-api.version>2.2.1</maven-plugin-api.version>
73+
74+
<jgit.version>2.0.0.201206130900-r</jgit.version>
75+
<junit.version>4.10</junit.version>
76+
<mockito.version>1.9.0</mockito.version>
77+
78+
<java.target>1.6</java.target>
79+
<sourceEncoding>UTF-8</sourceEncoding>
80+
<outputEncoding>UTF-8</outputEncoding>
81+
<fest-assert.version>1.4</fest-assert.version>
82+
</properties>
83+
84+
<dependencies>
85+
<!-- MAVEN -->
86+
<dependency>
87+
<groupId>org.apache.maven</groupId>
88+
<artifactId>maven-plugin-api</artifactId>
89+
<version>${maven-plugin-api.version}</version>
90+
</dependency>
91+
<dependency>
92+
<groupId>org.apache.maven</groupId>
93+
<artifactId>maven-project</artifactId>
94+
<version>${maven-plugin-api.version}</version>
95+
</dependency>
96+
97+
<dependency>
98+
<groupId>com.fasterxml.jackson.core</groupId>
99+
<artifactId>jackson-databind</artifactId>
100+
<version>2.2.3</version>
101+
</dependency>
102+
103+
<dependency>
104+
<groupId>com.google.inject</groupId>
105+
<artifactId>guice</artifactId>
106+
<version>2.0</version>
107+
</dependency>
108+
109+
<!-- JSON -->
110+
<dependency>
111+
<groupId>net.sf.json-lib</groupId>
112+
<artifactId>json-lib</artifactId>
113+
<version>2.4</version>
114+
<classifier>jdk15</classifier>
115+
</dependency>
116+
117+
<!-- Joda Time -->
118+
<dependency>
119+
<groupId>joda-time</groupId>
120+
<artifactId>joda-time</artifactId>
121+
<version>2.0</version>
122+
</dependency>
123+
124+
<!-- Guava -->
125+
<dependency>
126+
<groupId>com.google.guava</groupId>
127+
<artifactId>guava</artifactId>
128+
<version>15.0</version>
129+
</dependency>
130+
131+
<!-- IntelliJ Annotations -->
132+
<dependency>
133+
<groupId>com.intellij</groupId>
134+
<artifactId>annotations</artifactId>
135+
<version>9.0.4</version>
136+
</dependency>
137+
138+
<!-- JGit -->
139+
140+
<dependency>
141+
<groupId>org.eclipse.jgit</groupId>
142+
<artifactId>org.eclipse.jgit</artifactId>
143+
<version>${jgit.version}</version>
144+
</dependency>
145+
146+
<!-- Test stuff -->
147+
<dependency>
148+
<groupId>junit</groupId>
149+
<artifactId>junit</artifactId>
150+
<version>${junit.version}</version>
151+
<scope>test</scope>
152+
</dependency>
153+
154+
<dependency>
155+
<groupId>org.easytesting</groupId>
156+
<artifactId>fest-assert</artifactId>
157+
<version>${fest-assert.version}</version>
158+
<scope>test</scope>
159+
</dependency>
160+
161+
<dependency>
162+
<groupId>org.codehaus.plexus</groupId>
163+
<artifactId>plexus-utils</artifactId>
164+
<version>2.0.5</version>
165+
<scope>test</scope>
166+
</dependency>
167+
168+
<dependency>
169+
<groupId>org.mockito</groupId>
170+
<artifactId>mockito-all</artifactId>
171+
<version>${mockito.version}</version>
172+
<scope>test</scope>
173+
</dependency>
174+
175+
<dependency>
176+
<groupId>org.apache.commons</groupId>
177+
<artifactId>commons-io</artifactId>
178+
<version>1.3.2</version>
179+
<type>jar</type>
180+
<scope>test</scope>
181+
</dependency>
182+
183+
<dependency>
184+
<groupId>pl.pragmatists</groupId>
185+
<artifactId>JUnitParams</artifactId>
186+
<version>1.0.2</version>
187+
<scope>test</scope>
188+
</dependency>
189+
</dependencies>
190+
191+
<build>
192+
<!-- GIT COMMIT ID PLUGIN CONFIGURATION -->
193+
<resources>
194+
<resource>
195+
<directory>src/main/resources</directory>
196+
<filtering>true</filtering>
197+
<includes>
198+
<include>**/*.properties</include>
199+
<include>**/*.xml</include>
200+
<include>**/*.json</include>
201+
</includes>
202+
</resource>
203+
</resources>
204+
205+
<plugins>
206+
<!--<plugin>-->
207+
<!--<groupId>pl.project13.maven</groupId>-->
208+
<!--<artifactId>git-commit-id-plugin</artifactId>-->
209+
<!--<version>${project.version}</version>-->
210+
<!--<executions>-->
211+
<!--<execution>-->
212+
<!--<goals>-->
213+
<!--<goal>revision</goal>-->
214+
<!--</goals>-->
215+
<!--</execution>-->
216+
<!--</executions>-->
217+
<!--<configuration>-->
218+
<!--<verbose>true</verbose>-->
219+
<!--<skip>false</skip>-->
220+
<!--<prefix>git</prefix>-->
221+
<!--<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>-->
222+
<!--<generateGitPropertiesFile>true</generateGitPropertiesFile>-->
223+
<!--<generateGitPropertiesFilename>target/testing.properties</generateGitPropertiesFilename>-->
224+
225+
<!--<dateFormat>dd.MM.yyyy '@' HH:mm:ss z</dateFormat>-->
226+
<!--<useNativeGit>false</useNativeGit>-->
227+
<!--<abbrevLength>7</abbrevLength>-->
228+
<!--<format>properties</format>-->
229+
230+
<!--<gitDescribe>-->
231+
<!--<skip>false</skip>-->
232+
<!--<always>false</always>-->
233+
<!--<abbrev>7</abbrev>-->
234+
<!--<dirty>-DEVEL</dirty>-->
235+
<!--<forceLongFormat>false</forceLongFormat>-->
236+
<!--</gitDescribe>-->
237+
238+
<!--<excludeProperties>-->
239+
<!--<excludeProperty>git.commit.*</excludeProperty>-->
240+
<!--<excludeProperty>git.remote.origin.url</excludeProperty>-->
241+
<!--</excludeProperties>-->
242+
243+
<!--<failOnNoGitDirectory>true</failOnNoGitDirectory>-->
244+
<!--<failOnUnableToExtractRepoInfo>true</failOnUnableToExtractRepoInfo>-->
245+
<!--</configuration>-->
246+
<!--</plugin>-->
247+
<!-- Setting built-in java compiler properties -->
248+
<plugin>
249+
<groupId>org.apache.maven.plugins</groupId>
250+
<artifactId>maven-compiler-plugin</artifactId>
251+
<version>2.5.1</version>
252+
<configuration>
253+
<encoding>UTF-8</encoding>
254+
<source>${java.target}</source>
255+
<target>${java.target}</target>
256+
</configuration>
257+
</plugin>
258+
259+
<plugin>
260+
<artifactId>maven-plugin-plugin</artifactId>
261+
<version>3.2</version>
262+
<executions>
263+
<execution>
264+
<id>generated-helpmojo</id>
265+
<goals>
266+
<goal>helpmojo</goal>
267+
</goals>
268+
<configuration>
269+
<goalPrefix>git-commit-id</goalPrefix>
270+
<helpPackageName>pl.project13.maven</helpPackageName>
271+
</configuration>
272+
</execution>
273+
</executions>
274+
</plugin>
275+
</plugins>
276+
</build>
277+
278+
<profiles>
279+
<profile>
280+
<id>gpg</id>
281+
<build>
282+
<plugins>
283+
<!-- GPG -->
284+
<plugin>
285+
<groupId>org.apache.maven.plugins</groupId>
286+
<artifactId>maven-gpg-plugin</artifactId>
287+
<executions>
288+
<execution>
289+
<id>sign-artifacts</id>
290+
<phase>verify</phase>
291+
<goals>
292+
<goal>sign</goal>
293+
</goals>
294+
</execution>
295+
</executions>
296+
</plugin>
297+
</plugins>
298+
</build>
299+
</profile>
300+
</profiles>
301+
</project>
302+

0 commit comments

Comments
 (0)