-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
readme updated with info about latest release with native git
- Loading branch information
Showing
3 changed files
with
330 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ A detailed description of using the pluing is available in the <a href="https:// | |
|
||
Versions | ||
-------- | ||
The current version is **2.1.9**. | ||
The current version is **2.1.10**. | ||
|
||
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. | ||
|
||
|
@@ -70,7 +70,7 @@ It's really simple to setup this plugin; below is a sample pom that you may base | |
<packaging>war</packaging> | ||
<version>0.1</version> | ||
<name>my-git-plugin-sample-app</name> | ||
<url>http://www.blog.project13.pl</url> | ||
<url>http://www.project13.pl</url> | ||
|
||
<dependencies /> | ||
|
||
|
@@ -93,7 +93,7 @@ It's really simple to setup this plugin; below is a sample pom that you may base | |
<plugin> | ||
<groupId>pl.project13.maven</groupId> | ||
<artifactId>git-commit-id-plugin</artifactId> | ||
<version>2.1.9</version> | ||
<version>2.1.10</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
|
@@ -112,13 +112,16 @@ It's really simple to setup this plugin; below is a sample pom that you may base | |
<!-- false is default here, it prints some more information during the build --> | ||
<verbose>false</verbose> | ||
|
||
<!-- @since 2.1.9 --> | ||
<!-- | ||
false is default here, if set to true it uses native GIT excutable for | ||
better performance (it must be installed in system and available in system PATH) | ||
<!-- @since 2.1.10 --> | ||
<!-- | ||
false is default here, if set to true it uses native `git` excutable for extracting all data. | ||
This usualy has better performance than the default (jgit) implemenation, but requires you to | ||
have git available as executable for the build as well as *might break unexpectedly* when you | ||
upgrade your system-wide git installation. | ||
As rule of thumb - stay on `jgit` (keep this `false`) until you notice performance problems. | ||
--> | ||
<useNativeGit>false</useNativeGit> | ||
<useNativeGit>false</useNativeGit> | ||
|
||
<!-- | ||
If you'd like to tell the plugin where your .git directory is, | ||
|
@@ -531,6 +534,7 @@ Optional parameters: | |
* **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. | ||
* **skip** - `(default: false)` *(available since v2.1.8)* - Skip the plugin execution completely. | ||
* **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. | ||
* **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). | ||
|
||
**gitDescribe**: | ||
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 | |
* @mostr - for bugfixes and a framework to do integration testing, | ||
* @fredcooke - for consistent feedback and suggestions, | ||
* @MrOnion - for a small yet fast bugfix, | ||
* @TheSnoozer - for helping out others on issues as well as his contributions, | ||
* @cardil and @TheSnoozer - for helping with getting the native git support shipped, | ||
* ... many others - thank you for your contributions, | ||
* ... you! - for using the plugin :-) | ||
|
||
Notable happy users | ||
=================== | ||
|
||
* [neo4j](http://www.neo4j.org/) graph database | ||
* foundationdb.com | ||
* [Spring Boot](http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready-git-commit-information) | ||
* Akamai | ||
* others I know of but shouldn't tell ;-) | ||
* many others I don't know of | ||
* [neo4j](http://www.neo4j.org/) – graph database | ||
* [foundationdb](http://foundationdb.com) – another open source database | ||
* [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 | ||
* Akamai, Sabre, | ||
* others I know of, but can't tell, | ||
* many others I don't know of. | ||
|
||
License | ||
======= | ||
|
@@ -579,7 +583,4 @@ and maybe someone else has some idea or would like to upvote your issue. | |
|
||
In all other cases, feel free to contact me by sending an email to `[email protected]`, I'll definitely write back. :-) | ||
|
||
|
||
|
||
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/ktoso/maven-git-commit-id-plugin/trend.png)](https://bitdeli.com/free "Bitdeli Badge") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,302 @@ | ||
<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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.sonatype.oss</groupId> | ||
<artifactId>oss-parent</artifactId> | ||
<version>6</version> | ||
</parent> | ||
|
||
<groupId>pl.project13.maven</groupId> | ||
<artifactId>git-commit-id-plugin</artifactId> | ||
<packaging>maven-plugin</packaging> | ||
<version>2.1.10-SNAPSHOT</version> | ||
<name>Git Commit Id Plugin Maven Mojo</name> | ||
<description> | ||
git-commit-id-plugin is a plugin quite similar to | ||
https://fisheye.codehaus.org/browse/mojo/tags/buildnumber-maven-plugin-1.0-beta-4 for example but as buildnumber | ||
only supports svn (which is very sad) and cvs (which is even more sad). | ||
This plugin makes basic repository information available through maven resources. This can be used to display | ||
"what version is this?" or "who has deployed this and when, from which branch?" information at runtime - making | ||
it easy to find things like "oh, that isn't deployed yet, I'll test it tomorrow" and making both testers and | ||
developers life easier. | ||
|
||
The data currently exported is like this (that's the end effect from the GitRepositoryState Bean): | ||
{ | ||
"branch" : "testing-maven-git-plugin", | ||
"commitTime" : "06.01.1970 @ 16:16:26 CET", | ||
"commitId" : "787e39f61f99110e74deed68ab9093088d64b969", | ||
"commitUserName" : "Konrad Malawski", | ||
"commitUserEmail" : "[email protected]", | ||
"commitMessageFull" : "releasing my fun plugin :-) + fixed some typos + cleaned up directory structure + added | ||
license etc", | ||
"commitMessageShort" : "releasing my fun plugin :-)", | ||
"buildTime" : "06.01.1970 @ 16:17:53 CET", | ||
"buildUserName" : "Konrad Malawski", | ||
"buildUserEmail" : "[email protected]" | ||
} | ||
|
||
Note that the data is exported via maven resource filtering and is really easy to use with spring - | ||
which I've explained in detail in this readme https://github.com/ktoso/maven-git-commit-id-plugin | ||
</description> | ||
<url>http://www.blog.project13.pl</url> | ||
|
||
<developers> | ||
<developer> | ||
<id>ktoso</id> | ||
<name>Konrad Malawski</name> | ||
<email>[email protected]</email> | ||
<organization>Project13.pl</organization> | ||
<url>http://blog.project13.pl</url> | ||
</developer> | ||
</developers> | ||
|
||
<prerequisites> | ||
<maven>[${maven-plugin-api.version},)</maven> | ||
</prerequisites> | ||
|
||
<licenses> | ||
<license> | ||
<name>GNU Lesser General Public License 3.0</name> | ||
<url>http://www.gnu.org/licenses/lgpl-3.0.txt</url> | ||
</license> | ||
</licenses> | ||
|
||
<scm> | ||
<url>[email protected]/ktoso/maven-git-commit-id-plugin.git</url> | ||
<connection>scm:git:https://github.com/ktoso/maven-git-commit-id-plugin</connection> | ||
<developerConnection>scm:git:[email protected]:ktoso/maven-git-commit-id-plugin.git</developerConnection> | ||
</scm> | ||
|
||
<properties> | ||
<maven-plugin-api.version>2.2.1</maven-plugin-api.version> | ||
|
||
<jgit.version>2.0.0.201206130900-r</jgit.version> | ||
<junit.version>4.10</junit.version> | ||
<mockito.version>1.9.0</mockito.version> | ||
|
||
<java.target>1.6</java.target> | ||
<sourceEncoding>UTF-8</sourceEncoding> | ||
<outputEncoding>UTF-8</outputEncoding> | ||
<fest-assert.version>1.4</fest-assert.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<!-- MAVEN --> | ||
<dependency> | ||
<groupId>org.apache.maven</groupId> | ||
<artifactId>maven-plugin-api</artifactId> | ||
<version>${maven-plugin-api.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.maven</groupId> | ||
<artifactId>maven-project</artifactId> | ||
<version>${maven-plugin-api.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>2.2.3</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.google.inject</groupId> | ||
<artifactId>guice</artifactId> | ||
<version>2.0</version> | ||
</dependency> | ||
|
||
<!-- JSON --> | ||
<dependency> | ||
<groupId>net.sf.json-lib</groupId> | ||
<artifactId>json-lib</artifactId> | ||
<version>2.4</version> | ||
<classifier>jdk15</classifier> | ||
</dependency> | ||
|
||
<!-- Joda Time --> | ||
<dependency> | ||
<groupId>joda-time</groupId> | ||
<artifactId>joda-time</artifactId> | ||
<version>2.0</version> | ||
</dependency> | ||
|
||
<!-- Guava --> | ||
<dependency> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
<version>15.0</version> | ||
</dependency> | ||
|
||
<!-- IntelliJ Annotations --> | ||
<dependency> | ||
<groupId>com.intellij</groupId> | ||
<artifactId>annotations</artifactId> | ||
<version>9.0.4</version> | ||
</dependency> | ||
|
||
<!-- JGit --> | ||
|
||
<dependency> | ||
<groupId>org.eclipse.jgit</groupId> | ||
<artifactId>org.eclipse.jgit</artifactId> | ||
<version>${jgit.version}</version> | ||
</dependency> | ||
|
||
<!-- Test stuff --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>${junit.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.easytesting</groupId> | ||
<artifactId>fest-assert</artifactId> | ||
<version>${fest-assert.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.codehaus.plexus</groupId> | ||
<artifactId>plexus-utils</artifactId> | ||
<version>2.0.5</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-all</artifactId> | ||
<version>${mockito.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-io</artifactId> | ||
<version>1.3.2</version> | ||
<type>jar</type> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>pl.pragmatists</groupId> | ||
<artifactId>JUnitParams</artifactId> | ||
<version>1.0.2</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<!-- GIT COMMIT ID PLUGIN CONFIGURATION --> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>**/*.properties</include> | ||
<include>**/*.xml</include> | ||
<include>**/*.json</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
|
||
<plugins> | ||
<!--<plugin>--> | ||
<!--<groupId>pl.project13.maven</groupId>--> | ||
<!--<artifactId>git-commit-id-plugin</artifactId>--> | ||
<!--<version>${project.version}</version>--> | ||
<!--<executions>--> | ||
<!--<execution>--> | ||
<!--<goals>--> | ||
<!--<goal>revision</goal>--> | ||
<!--</goals>--> | ||
<!--</execution>--> | ||
<!--</executions>--> | ||
<!--<configuration>--> | ||
<!--<verbose>true</verbose>--> | ||
<!--<skip>false</skip>--> | ||
<!--<prefix>git</prefix>--> | ||
<!--<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>--> | ||
<!--<generateGitPropertiesFile>true</generateGitPropertiesFile>--> | ||
<!--<generateGitPropertiesFilename>target/testing.properties</generateGitPropertiesFilename>--> | ||
|
||
<!--<dateFormat>dd.MM.yyyy '@' HH:mm:ss z</dateFormat>--> | ||
<!--<useNativeGit>false</useNativeGit>--> | ||
<!--<abbrevLength>7</abbrevLength>--> | ||
<!--<format>properties</format>--> | ||
|
||
<!--<gitDescribe>--> | ||
<!--<skip>false</skip>--> | ||
<!--<always>false</always>--> | ||
<!--<abbrev>7</abbrev>--> | ||
<!--<dirty>-DEVEL</dirty>--> | ||
<!--<forceLongFormat>false</forceLongFormat>--> | ||
<!--</gitDescribe>--> | ||
|
||
<!--<excludeProperties>--> | ||
<!--<excludeProperty>git.commit.*</excludeProperty>--> | ||
<!--<excludeProperty>git.remote.origin.url</excludeProperty>--> | ||
<!--</excludeProperties>--> | ||
|
||
<!--<failOnNoGitDirectory>true</failOnNoGitDirectory>--> | ||
<!--<failOnUnableToExtractRepoInfo>true</failOnUnableToExtractRepoInfo>--> | ||
<!--</configuration>--> | ||
<!--</plugin>--> | ||
<!-- Setting built-in java compiler properties --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.5.1</version> | ||
<configuration> | ||
<encoding>UTF-8</encoding> | ||
<source>${java.target}</source> | ||
<target>${java.target}</target> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-plugin-plugin</artifactId> | ||
<version>3.2</version> | ||
<executions> | ||
<execution> | ||
<id>generated-helpmojo</id> | ||
<goals> | ||
<goal>helpmojo</goal> | ||
</goals> | ||
<configuration> | ||
<goalPrefix>git-commit-id</goalPrefix> | ||
<helpPackageName>pl.project13.maven</helpPackageName> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
<profile> | ||
<id>gpg</id> | ||
<build> | ||
<plugins> | ||
<!-- GPG --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-gpg-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>sign-artifacts</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>sign</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
</project> | ||
|
Oops, something went wrong.