Skip to content

Commit 37777cd

Browse files
authored
Merge pull request #481 from Marcono1234/patch-1
Update faq.md
2 parents 8549ebf + ea5781d commit 37777cd

File tree

3 files changed

+44
-28
lines changed

3 files changed

+44
-28
lines changed

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Contributing
2+
In general pull requests and support for open issues is always welcome!
3+
4+
## Project layout
5+
This project is a multi-module Maven project. It consists of the following modules:
6+
- [core](core) (`git-commit-id-plugin-core`): The core framework of the plugin
7+
- [maven](maven) (`git-commit-id-plugin`): The actual plugin, which depends on the `core` module
8+
9+
To build the project:
10+
1. Install Maven
11+
2. Install a JDK meeting the minimum requirements specified by Maven and in the [README](README.md)
12+
3. Run the following command in the main directory of the project:
13+
```
14+
mvn clean verify
15+
```
16+
This will build the project and run all tests.
17+
18+
## Checkstyle
19+
If you open a pull request or want to help out in any way please keep in mind that we currently use Checkstyle to ensure that the project somehow maintains a uniform code base. Fortunately the most common IDEs support the integration of Checkstyle via plugins. On top of more or less native integration into modern development tools the Checkstyle rules are currently also being verified by using the [maven-checkstyle-plugin](https://maven.apache.org/plugins/maven-checkstyle-plugin/) during the build. It should be worth to highlight that you are not required to install Checkstyle inside your IDE. If you feel more comfortable running the checks via Maven this would do the trick!
20+
The Checkstyle rules for this project are currently residing in `.github/.checkstyle/` and for some IDEs those rules need to be imported manually (unfortunately there is no better solution available for this yet). The current rule set is pretty much the same as the `google_checks.xml` with certain checks disabled (e.g. line length). If you choose to integrate Checkstyle inside your IDE feel free to checkout some high level requirements to get started with Checkstyle within your IDE:
21+
* Eclipse – for Eclipse / STS you would need to install the `Checkstyle Plug-in` via `Help -> Eclipse Marketplace -> Search` after restarting Eclipse it should pick-up the rules automatically.
22+
* IntelliJ IDEA – for IntelliJ you would need to install the `CheckStyle-IDEA` plugin via `File -> Settings -> Plugins -> Search`. After restarting IntelliJ you would need to import the Checkstyle rules manually via `File -> Settings -> Checkstyle`. As Checkstyle version you may choose `8.2` and then click on the plus-sign on the right. As description you may choose `maven-git-commit-id-plugin` and as local Checkstyle file you may choose one of the Checkstyle rules residing in `.github/.checkstyle/`. Please note that the rule-file depends on the version you have selected in the previous step and thus it is essential to ensure that the version numbers match up. As next step you unfortunately will be prompted to enter the **full directory** of the `checkstyle-suppressions.xml`-file.
23+
* NetBeans – feel free to open an issue and share your installation guide :-)
24+
* Maven – if you want to run Checkstyle via Maven you simply can execute `mvn clean verify -Pcheckstyle -Dmaven.test.skip=true -B`.

README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ maven git commit id plugin
22
==================================
33

44
[![Join the chat at https://gitter.im/git-commit-id/maven-git-commit-id-plugin](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/git-commit-id/maven-git-commit-id-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5-
[![Build Status](https://secure.travis-ci.org/git-commit-id/maven-git-commit-id-plugin.svg?branch=master)](http://travis-ci.org/git-commit-id/maven-git-commit-id-plugin)
5+
[![Build Status](https://secure.travis-ci.org/git-commit-id/maven-git-commit-id-plugin.svg?branch=master)](https://travis-ci.org/git-commit-id/maven-git-commit-id-plugin)
66
[![Coverage Status](https://coveralls.io/repos/github/git-commit-id/maven-git-commit-id-plugin/badge.svg?branch=master)](https://coveralls.io/github/git-commit-id/maven-git-commit-id-plugin?branch=master)
7-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/pl.project13.maven/git-commit-id-plugin/badge.svg)](http://search.maven.org/#search|ga|1|pl.project13.maven)
7+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/pl.project13.maven/git-commit-id-plugin/badge.svg)](https://search.maven.org/artifact/pl.project13.maven/git-commit-id-plugin)
88

99

10-
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 at the time when I started this plugin only supported CVS and SVN, something had to be done.
11-
I had to quickly develop an git version of such a plugin. For those who don't know the previous plugins, it basically helps you to help you with the following tasks and answer related questions
10+
git-commit-id-plugin is a plugin quite similar to [Build Number Maven Plugin](https://www.mojohaus.org/buildnumber-maven-plugin/index.html) for example but as the Build Number plugin at the time when I started this plugin only supported CVS and SVN, something had to be done.
11+
I had to quickly develop a Git version of such a plugin. For those who don't know the plugin, it basically helps you with the following tasks and answers related questions
1212
* Which version had the bug? Is that deployed already?
1313
* Make your distributed deployment aware of versions
1414
* Validate if properties are set as expected
@@ -22,19 +22,20 @@ Quicklinks (all relevant documentation)
2222
* [A more technical documentation on how to use the leverage the generated properties from this plugin](maven/docs/using-the-plugin-in-more-depth.md)
2323
* [A general documentation for git describe (usefull feature in this plugin, if you are not familiar with the command)](maven/docs/git-describe.md)
2424
* [Frequently Asked Question (FAQ)](maven/docs/faq.md)
25+
* [Contributing](CONTRIBUTING.md)
2526

2627
Getting the plugin
2728
==================
28-
The plugin **is available from Maven Central** (<a href="http://search.maven.org/#search%7Cga%7C1%7Cpl.project13">see here</a>), so you don't have to configure any additional repositories to use this plugin.
29+
The plugin **is available from Maven Central** ([see here](https://search.maven.org/artifact/pl.project13.maven/git-commit-id-plugin)), so you don't have to configure any additional repositories to use this plugin.
2930

30-
A detailed description of using the plugin is available in the [Using the plugin](maven/docs/using-the-plugin.md) section. All you need to do in the basic setup is to include that plugin definition in your `pom.xml`.
31-
For more advanced users we also prepared a [guide to provide a brief overview of the more advanced configurations](maven/docs/using-the-plugin.md)<a>... read on!
31+
A detailed description of using the plugin is available in the [Using the plugin](maven/docs/using-the-plugin.md) document. All you need to do in the basic setup is to include that plugin definition in your `pom.xml`.
32+
For more advanced users we also prepared a [guide to provide a brief overview of the more advanced configurations](maven/docs/using-the-plugin.md)... read on!
3233

3334
Versions
3435
--------
3536
The current version is **4.0.0** ([changelist](https://github.com/git-commit-id/maven-git-commit-id-plugin/issues?q=milestone%3A4.0.0)).
3637

37-
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.
38+
You can check the available versions by visiting [search.maven.org](https://search.maven.org/artifact/pl.project13.maven/git-commit-id-plugin), though using the newest is obviously the best choice.
3839

3940
Plugin compatibility with Java
4041
-------------------------------
@@ -45,7 +46,7 @@ Plugin compatibility with Java
4546
| 3.0.0 | Java 1.8 |
4647

4748

48-
Plugin compatibility with maven
49+
Plugin compatibility with Maven
4950
-----------------------------
5051
Even though this plugin tries to be compatible with every Maven version there are some known limitations with specific versions. Here is a list that tries to outline the current state of the art:
5152

@@ -64,7 +65,7 @@ Starting with Maven 3.1.1 any plugin version is currently compatible. Only known
6465
Getting SNAPSHOT versions of the plugin
6566
---------------------------------------
6667
If you really want to use **snapshots**, here's the repository they are deployed to.
67-
But I highly recommend using only stable versions, from maven central... :-)
68+
But I highly recommend using only stable versions, from Maven Central... :-)
6869

6970
```xml
7071
<pluginRepositories>
@@ -101,9 +102,9 @@ I'd like to give a big thanks to some of these folks, for their suggestions and
101102
Notable happy users
102103
===================
103104

104-
* [neo4j](http://www.neo4j.org/) – graph database
105-
* [foundationdb](http://foundationdb.com) – another open source database
106-
* [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
105+
* [neo4j](https://neo4j.com/) – graph database
106+
* [FoundationdDB](https://www.foundationdb.org/) – another open source database
107+
* [Spring Boot](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using-boot-maven) – yes, the upstream Spring project is using us
107108
* Akamai, Sabre, EasyDITA, and many many others,
108109
* many others I don't know of.
109110

@@ -115,7 +116,9 @@ I'm releasing this plugin under the **GNU Lesser General Public License 3.0**.
115116

116117
You're free to use it as you wish, the full license text is attached in the LICENSE file.
117118

118-
The best way to ask for features / improvements is [via the Issues section on github - it's better than email](https://github.com/git-commit-id/maven-git-commit-id-plugin/issues) because I won't loose when I have a "million emails inbox" day,
119+
Feature requests
120+
================
121+
The best way to ask for features / improvements is [via the Issues section on GitHub - it's better than email](https://github.com/git-commit-id/maven-git-commit-id-plugin/issues) because I won't loose when I have a "million emails inbox" day,
119122
and maybe someone else has some idea or would like to upvote your issue.
120123

121124
That's all folks! **Happy hacking!**

maven/docs/faq.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,11 @@ Example:
2929
</plugin>
3030
```
3131

32-
If you are using the maven build with [Maven's Plugin Prefix Resolution](https://maven.apache.org/guides/introduction/introduction-to-plugin-prefix-mapping.html) (e.g. `mvn somePrefix:goal`) please note that this currently seems to be [not supported by maven](https://issues.apache.org/jira/browse/MNG-6260).
33-
Instead of using the Plugin Prefix Resolution add an execution tag that calls the desired goal of the plugin within a normal maven life cycle (e.g. `mvn clean package`).
32+
If you are using the Maven build with [Maven's Plugin Prefix Resolution](https://maven.apache.org/guides/introduction/introduction-to-plugin-prefix-mapping.html) (e.g. `mvn somePrefix:goal`) please note that this currently seems to be [not supported by Maven](https://issues.apache.org/jira/browse/MNG-6260).
33+
Instead of using the Plugin Prefix Resolution add an execution tag that calls the desired goal of the plugin within a normal Maven life cycle (e.g. `mvn clean package`).
3434

3535
Generated properties are not being used in install and/or deploy
3636
-------------------------------
37-
If you try to use generated properties like ${git.commit.id} alongside with your artificat finalName you will soon notice that those properties are not being used in install and/or deploy. This specific behaviour is basically not intended / not supported by maven-install-plugin and/or maven-deploy-plugin (https://issues.apache.org/jira/browse/MINSTALL-1 / https://issues.apache.org/jira/browse/MDEPLOY-93). The naming format in the remote repo seems always $artifactId-$version-$classifier *by default* and thus any generated property will not end up inside the artifact being installed/deployed. If you for whatever reason still want to have something special you may want to [checkout a full workaround](https://github.com/git-commit-id/maven-git-commit-id-plugin/issues/256#issuecomment-321476196) that uses a specific configuration of `install-file` / `deploy-file`.
37+
If you try to use generated properties like `${git.commit.id}` alongside with your artifact finalName you will soon notice that those properties are not being used in install and/or deploy. This specific behaviour is basically not intended / not supported by maven-install-plugin and/or maven-deploy-plugin (https://issues.apache.org/jira/browse/MINSTALL-1 / https://issues.apache.org/jira/browse/MDEPLOY-93). The naming format in the remote repo seems to be always `$artifactId-$version-$classifier` *by default* and thus any generated property will not end up inside the artifact being installed/deployed. If you for whatever reason still want to have something special you may want to [checkout a full workaround](https://github.com/git-commit-id/maven-git-commit-id-plugin/issues/256#issuecomment-321476196) that uses a specific configuration of `install-file` / `deploy-file`.
3838

3939
As a general note also ensure to use `mvn clean deploy` instead of `mvn deploy:deploy` (or you run into https://issues.apache.org/jira/browse/MNG-6260) and ensure to set `<injectAllReactorProjects>true</injectAllReactorProjects>` inside the plugin's config.
40-
41-
How to contribute to the project
42-
-------------------------------
43-
In general pull requests and support for open issues is always welcome!
44-
If you open a pull request or want to help out in any way please keep in mind that we currently use `checkstyle` to ensure that the project somehow maintains a uniform code base. Fortunately the most common IDEs support the integration of `checkstyle` via plugins. On top of more or less native integration into modern development tools the `checkstyle` rules are currently also being verified by using the [maven-checkstyle-plugin](https://maven.apache.org/plugins/maven-checkstyle-plugin/) during the build. it should be worth to highlight that you are not required to install `checkstyle` inside your IDE. If you feel more comfortable running the checks via maven this would to the trick!
45-
The checkstyle rules for this project are currently residing in `src/test/resources/checks` and for some IDEs those rules need to be imported manually (unfortunately there is no better solution available for this yet). The current rule set is pretty much the same as the `google_checks.xml` with certain checks disabled (e.g. line length). If you choose to integrate `checkstyle` inside your IDE feel free to checkout some high level requirements to get started with checkstyle within your IDE:
46-
* eclipse -- for eclipse / STS you would need to install the `checkstyle plug-in` via `Help -> Eclipse Marketplace -> Search` after restarting eclipse it should pick-up the rules automatically. If this does not work out of the box checkout the [official integration guide](http://checkstyle.sourceforge.net/eclipse.html) or use google to trace down your error message.
47-
* IntelliJ IDEA -- for IntelliJ you would need to install the `CheckStyle-IDEA` via `File -> Settings -> Plugins -> Search`. After restarting IntelliJ you would need to import the `checkstyle` rules manually via `File -> Settings -> Checkstyle`. As checkstyle version you may choose `8.2` and then click on the plus-sign on the right. As description you may choose `maven-git-commit-id-plugin` and as local checkstyle file you may choose one of the checkstyle rule residing in `src/test/resources/checks`. Please note that the rule-file depend on the version you have selected in the previous step and thus it is essential to ensure that the version numbers match up. As next-step you unfortunately will be prompted to enter the **full directory** of the `checkstyle-suppressions.xml`-File. If this does not work out of the box checkout the [official integration guide](http://checkstyle.sourceforge.net/idea.html) or use google to trace down your error message.
48-
* Netbeans -- feel free to open a ticket and share your installation guide :-) You can also check out the [official integration guide](http://checkstyle.sourceforge.net/netbeans.html) or use google to get any addtional help.
49-
* Maven -- if you want to run `checkstyle` via maven you simply can execute `mvn clean verify -Pcheckstyle -Dmaven.test.skip=true -B`.
50-

0 commit comments

Comments
 (0)