服务器分 IT、ST、UT、PT环境,各个环境对应的配置文件不同,通常打完包要手动去更新这些配置文件。
为提高效率,节省打包时间研究了一下“war”这个task,发现是可以更新打包的包,参数如下
update 参数官方介绍:
parameterDescriptionRequiredupdateindicates whether to update or overwrite the destination file if it already exists. Default is “false”.Noant输出如下
package: [war] Building war: D:\Program Files\eclipse\workspace\updatetest\war\updatetest-1.0.0-20170901143924.war package-it: [war] Updating war: D:\Program Files\eclipse\workspace\updatetest\war\updatetest-1.0.0-20170901143924.war BUILD SUCCESSFUL Total time: 53 seconds注意: update 的文件要比war包里的时间新,否则不会更新相应的文件。
