【发布时间】:2011-06-08 02:44:41
【问题描述】:
我在这里有三个问题。一、maven的pom.xml和其他xml文件有区别吗?
其次,如果我想通过脚本重命名与 pom.xml 相同目录下的文件,可以在 pom.xml 中进行吗?如果可以,那我该怎么做呢?
最后,如何在 pom.xml 中获取当前时间?
事实上,我想要实现的是,我想通过在我 mvn 打包它之前附加时间戳来备份当前的包(.war)。我希望整个过程由 pom.xml 自动化,而不是手动处理它。
你好,
我找到了一种获取时间戳的方法,它会起作用吗?
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactID>buildnumber-maven-plugin</artifactId>
<execution>
<phrase>package</phrase>
<configuration>
<format>{0, date, yyyy-MM-dd HH:mm:ss}</format>
<items>timestamp</items>
</configuration>
<execution>
</plugin>
它会起作用吗?如果可行,我如何获得时间戳变量? $items 还是 $timestamp?
谢谢
【问题讨论】: