maven 打包 如何去掉时间戳

如题所述

第1个回答  2016-10-15
maven默认包后面是没有日期的,只有版本号。如果你想自定义名称,可以使用下面的插件完成,这个插件打包更灵活。在finalName属性中定义就行了。

1
2
3
4

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<finalName>nxxx</finalName>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
<id>xx-packag-parent</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
相似回答