首页 > 其他 > 详细

maven构建带版本号和日期的war包名

时间:2014-03-01 02:50:28      阅读:1508      评论:0      收藏:0      [点我收藏+]

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

maven构建带版本号和日期的war包名,布布扣,bubuko.com

maven构建带版本号和日期的war包名

原文:http://www.cnblogs.com/juforg/p/3573664.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!