1 Star 0 Fork 0

wangyangbto/maven-git-commit-id-plugin

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pom.xml 12.77 KB
一键复制 编辑 原始数据 按行查看 历史
<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>9</version>
</parent>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<packaging>maven-plugin</packaging>
<version>2.2.3-SNAPSHOT</version>
<name>Git Commit Id Maven Plugin</name>
<description>
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. See 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>konrad.malawski@java.pl</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>git@github.com/ktoso/maven-git-commit-id-plugin.git</url>
<connection>scm:git:https://github.com/ktoso/maven-git-commit-id-plugin</connection>
<developerConnection>scm:git:git@github.com:ktoso/maven-git-commit-id-plugin.git</developerConnection>
<tag>HEAD</tag>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.target>1.7</java.target>
<maven-plugin-api.version>3.1.1</maven-plugin-api.version>
<maven-plugin-plugin.version>3.4</maven-plugin-plugin.version>
<jgit.version>4.3.1.201605051710-r</jgit.version>
<junit.version>4.12</junit.version>
<mockito.version>2.0.35-beta</mockito.version>
<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-core</artifactId>
<version>${maven-plugin-api.version}</version>
</dependency>
<!-- dependencies to annotations -->
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>${maven-plugin-plugin.version}</version>
<scope>provided</scope><!-- annotations are needed only to build the plugin -->
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.6.4</version>
</dependency>
<!-- Joda Time -->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.1</version>
</dependency>
<!-- Guava -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
<!-- IntelliJ Annotations -->
<dependency>
<groupId>com.intellij</groupId>
<artifactId>annotations</artifactId>
<version>12.0</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>3.0.22</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
<type>jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>pl.pragmatists</groupId>
<artifactId>JUnitParams</artifactId>
<version>1.0.4</version>
<scope>test</scope>
</dependency>
<!--to avoid complaints during tests-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.13</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>
</includes>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<excludes>
<exclude>_git_*/**</exclude>
<exclude>README.md</exclude>
</excludes>
</testResource>
</testResources>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>${maven-plugin-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.4</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- if you would like to run the git-commit-id-plugin for your build, you could also include it here instead using a profile (see README.md) -->
<!-- Setting built-in java compiler properties -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.target}</source>
<target>${java.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<executions>
<execution>
<id>default-descriptor</id>
<phase>process-classes</phase>
</execution>
<!--
<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>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<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>
<profile>
<id>demo</id>
<build>
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>${project.version}</version>
<!-- optional to change the phases of the individual mojo's -->
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
</execution>
<execution>
<id>validate-the-git-infos</id>
<goals>
<goal>validateRevision</goal>
</goals>
<phase>package</phase>
</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>
<dateFormatTimeZone>GMT-08:00</dateFormatTimeZone>
<useNativeGit>false</useNativeGit>
<abbrevLength>7</abbrevLength>
<format>properties</format>
<injectAllReactorProjects>true</injectAllReactorProjects>
<gitDescribe>
<skip>false</skip>
<always>false</always>
<abbrev>7</abbrev>
<match>*</match>
<dirty>-DEVEL</dirty>
<forceLongFormat>false</forceLongFormat>
</gitDescribe>
<excludeProperties>
<excludeProperty>git.commit.*</excludeProperty>
<excludeProperty>git.remote.origin.url</excludeProperty>
</excludeProperties>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<failOnUnableToExtractRepoInfo>true</failOnUnableToExtractRepoInfo>
<!-- used in validateRevision -->
<validationProperties>
<validationProperty>
<name>validating project version</name>
<value>${project.version}</value>
<!-- <shouldMatchTo>^[0-9\.]*$</shouldMatchTo> -->
<shouldMatchTo><![CDATA[^.*(?<!-SNAPSHOT)$]]></shouldMatchTo>
</validationProperty>
<validationProperty>
<name>validating git dirty</name>
<value>${git.dirty}</value>
<shouldMatchTo>false</shouldMatchTo>
</validationProperty>
</validationProperties>
<validationShouldFailIfNoMatch>true</validationShouldFailIfNoMatch>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangyangbto/maven-git-commit-id-plugin.git
git@gitee.com:wangyangbto/maven-git-commit-id-plugin.git
wangyangbto
maven-git-commit-id-plugin
maven-git-commit-id-plugin
master

搜索帮助