|
| 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 | + |
| 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