规范的包名对开发及运维人员的记录及备份是有益的!
如何在maven 打包时后缀加时间,在原有打包plugin后面加如下代码:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>timestamp-property</id>
<goals>
<goal>timestamp-property</goal>
</goals>
</execution>
</executions>
<configuration>
<name>current.time</name>
<pattern>yyyy-MM-dd-HHmmss</pattern>
<timeZone>GMT+8</timeZone>
<regex/>
<source/>
<value/>
</configuration>
</plugin>
</plugins>
<!--设置打包后生产的包名 -->
<finalName>zjm_demo-${current.time}</finalName>