# Configuration & Properties
This file should give you an overview on how to use the generated properties within your project.
## Basic Configuration
Below is a sample configuration that will write a properties file `git.properties` containing all the git version info to the output directory of your project.
Note that the plugin binds to the initialize phase by default, so that all git properties are available for use throughout the build lifecycle.
```xml
io.github.git-commit-id
git-commit-id-maven-plugin
9.0.1
get-the-git-infos
revision
initialize
true
${project.build.outputDirectory}/git.properties
full
```
## Full Configuration
Below is a sample of a full `pom.xml` using the plugin.
```xml
4.0.0
pl.project13.maven
my-git-plugin-sample-app
war
0.1
my-git-plugin-sample-app
http://www.project13.pl
src/main/resources
true
**/*.properties
**/*.xml
io.github.git-commit-id
git-commit-id-maven-plugin
9.0.1
get-the-git-infos
revision
initialize
validate-the-git-infos
validateRevision
package
validating project version
${project.version}
true
```
Validation Usage Example
----------------
```xml
validating project version
${project.version}
validating git dirty
${git.dirty}
false
validating current commit has a tag
${git.closest.tag.commit.count}
0
```
Required Configuration for validation to work:
If you plan to use this feature you'll want to know that the validation will be executed inside an additional mojo.
Inside your pom you thus may want to add an additional execution tag that triggers the execution of the validation plugin.
You can also change the default phase of each execution by adding a `phase` definition.
```xml
get-the-git-infos
revision
validate-the-git-infos
validateRevision
package
```
*Note* : In order to be able to validate the generated git-properties inside the pom itself you may need to set the configuration `true`.
All Properties
---------------------
Refer to [this](https://github.com/git-commit-id/git-commit-id-plugin-core/blob/master/src/main/java/pl/project13/core/GitCommitPropertyConstant.java) to view all properties that can be generated by the plugin.
Keep in mind that all properties will be prefixed with the configurable prefix (`git.` by default).