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

  • 相关阅读:
    day08作业
    day07作业
    day06作业
    day05作业
    OOAD与UML
    大数据(3):基于sogou.500w.utf8数据Hbase和Spark实践
    大数据(2):基于sogou.500w.utf8数据hive的实践
    大数据(1):基于sogou.500w.utf8数据的MapReduce程序设计
    九大排序算法的Java实现
    数字在排序数组中出现的次数
  • 原文地址:https://www.cnblogs.com/juforg/p/3573664.html
Copyright © 2011-2022 走看看