|
72 | 72 | <target>1.5</target>
|
73 | 73 | </configuration>
|
74 | 74 | </plugin>
|
75 |
| - |
| 75 | + |
| 76 | +<plugin> |
| 77 | + <groupId>pl.project13.maven</groupId> |
| 78 | + <artifactId>git-commit-id-plugin</artifactId> |
| 79 | + <version>2.1.4</version> |
| 80 | + <executions> |
| 81 | + <execution> |
| 82 | + <goals> |
| 83 | + <goal>revision</goal> |
| 84 | + </goals> |
| 85 | + </execution> |
| 86 | + </executions> |
| 87 | + |
| 88 | + <configuration> |
| 89 | + <!-- that's the default value, you don't have to set it --> |
| 90 | + <prefix>git</prefix> |
| 91 | + |
| 92 | + <!-- that's the default value --> |
| 93 | + <dateFormat>dd.MM.yyyy '@' HH:mm:ss z</dateFormat> |
| 94 | + |
| 95 | + <!-- true is default here, it prints some more information during the build --> |
| 96 | + <verbose>true</verbose> |
| 97 | + |
| 98 | + <!-- |
| 99 | + If you'd like to tell the plugin where your .git directory is, |
| 100 | + use this setting, otherwise we'll perform a search trying to |
| 101 | + figure out the right directory. It's better to add it explicite IMHO. |
| 102 | + --> |
| 103 | + <dotGitDirectory>${project.basedir}/.git</dotGitDirectory> |
| 104 | + |
| 105 | + <!-- ALTERNATE SETUP - GENERATE FILE --> |
| 106 | + <!-- |
| 107 | + If you want to keep git information, even in your WAR file etc, |
| 108 | + use this mode, which will generate a properties file (with filled out values) |
| 109 | + which you can then normally read using new Properties().load(/**/) |
| 110 | + --> |
| 111 | + |
| 112 | + <!-- |
| 113 | + this is true by default; You may want to set this to false, if the plugin should run inside a |
| 114 | + <packaging>pom</packaging> project. Most projects won't need to override this property. |
| 115 | +
|
| 116 | + For an use-case for this kind of behaviour see: https://github.com/ktoso/maven-git-commit-id-plugin/issues/21 |
| 117 | + --> |
| 118 | + <skipPoms>true</skipPoms> |
| 119 | + |
| 120 | + <!-- this is false by default, forces the plugin to generate the git.properties file --> |
| 121 | + <generateGitPropertiesFile>true</generateGitPropertiesFile> |
| 122 | + |
| 123 | + <!-- The path for the to be generated properties file, it's relative to ${project.basedir} --> |
| 124 | + <generateGitPropertiesFilename>src/main/resources/git.properties</generateGitPropertiesFilename> |
| 125 | + |
| 126 | + <!-- true by default, controls whether the plugin will fail when no .git directory is found, when set to false the plugin will just skip execution --> |
| 127 | + <!-- @since 2.0.4 --> |
| 128 | + <failOnNoGitDirectory>false</failOnNoGitDirectory> |
| 129 | + |
| 130 | + <!-- @since 2.1.0 --> |
| 131 | + <!-- |
| 132 | + read up about git-describe on the in man, or it's homepage - it's a really powerful versioning helper |
| 133 | + and the recommended way to use git-commit-id-plugin. The configuration bellow is optional, |
| 134 | + by default describe will run "just like git-describe on the command line", even though it's a JGit reimplementation. |
| 135 | + --> |
| 136 | + <gitDescribe> |
| 137 | + |
| 138 | + <!-- don't generate the describe property --> |
| 139 | + <skip>false</skip> |
| 140 | + |
| 141 | + <!-- |
| 142 | + if no tag was found "near" this commit, just print the commit's id instead, |
| 143 | + helpful when you always expect this field to be not-empty |
| 144 | + --> |
| 145 | + <always>false</always> |
| 146 | + <!-- |
| 147 | + how many chars should be displayed as the commit object id? |
| 148 | + 7 is git's default, |
| 149 | + 0 has a special meaning (see end of this README.md), |
| 150 | + and 40 is the maximum value here |
| 151 | + --> |
| 152 | + <abbrev>7</abbrev> |
| 153 | + |
| 154 | + <!-- when the build is triggered while the repo is in "dirty state", append this suffix --> |
| 155 | + <dirty>-dirty</dirty> |
| 156 | + |
| 157 | + <!-- |
| 158 | + always print using the "tag-commits_from_tag-g_commit_id-maybe_dirty" format, even if "on" a tag. |
| 159 | + The distance will always be 0 if you're "on" the tag. |
| 160 | + --> |
| 161 | + <forceLongFormat>false</forceLongFormat> |
| 162 | + </gitDescribe> |
| 163 | + </configuration> |
| 164 | + |
| 165 | + </plugin> |
76 | 166 |
|
77 | 167 | </plugins>
|
78 | 168 | </build>
|
|
0 commit comments