auto buildnumber maven plugin

This commit is contained in:
Sola
2015-12-09 01:52:36 +08:00
parent 170dddf0c7
commit ecf7e8b9e5
2 changed files with 35 additions and 7 deletions

39
pom.xml
View File

@@ -1,22 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>WechatTicketSystem</name>
<groupId>love.sola.netsupport</groupId>
<artifactId>WechatTicketSystem</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<project.build.buildCount>001</project.build.buildCount>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<source>1.8</source>
<target>1.8</target>
</properties>
<scm>
<connection>scm:svn:http://127.0.0.1/dummy</connection>
<developerConnection>scm:svn:https://127.0.0.1/dummy</developerConnection>
<tag>HEAD</tag>
<url>http://127.0.0.1/dummy</url>
</scm>
<build>
<plugins>
<plugin>
@@ -28,11 +32,32 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<format>{0,number,0000}</format>
<items>
<item>buildNumber0</item>
</items>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
<revisionOnScmFailure>unknown</revisionOnScmFailure>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<finalName>${project.artifactId}##${project.build.buildCount}</finalName>
<finalName>${project.artifactId}##${buildNumber}</finalName>
</build>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>