zoukankan      html  css  js  c++  java
  • maven构建带版本号和日期的war包名

    21166312

    maven构建打包设置包名

    svn环境设置

    引用buildnumber插件

           <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>buildnumber-maven-plugin</artifactId>
            <version>1.2</version>
            <executions>
                <execution>
                    <phase>validate</phase>
                    <goals>
                        <goal>create</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <doCheck>false</doCheck>
                <doUpdate>false</doUpdate>
                <buildNumberPropertiesFileLocation>${project.build.directory}</buildNumberPropertiesFileLocation>
                <buildNumberPropertyName>verNum</buildNumberPropertyName>
                <timestampFormat>{0,date,yyyyMMddHHmmss}</timestampFormat>
                  <items>
                    <item>timestamp</item>
                  </items>
            </configuration>
        </plugin>
    [官网示例](http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html)
    

    设置包名

        <build>
            <finalName>${project.artifactId}-${project.version}.v${verNum}-${timestamp}</finalName>
            ...
        <build>
    

    结束

    另一款类似插件 http://maven-svn-revision-number-plugin.googlecode.com/svn/site/usage.html

  • 相关阅读:
    2013年2月最后一周
    linux虚拟机与winodows共享文件夹linux安装VMware tools
    汇编语言 手记8
    汇编语言 手记9
    虚拟机vmware与本地磁盘共享方法
    生活里多少会有些迷茫
    《恋爱厚黑学》杨冰阳
    2012年读书目录
    2013年2月第2个周末
    JBOSSJNDI日常
  • 原文地址:https://www.cnblogs.com/juforg/p/3573664.html
Copyright © 2011-2022 走看看