我试图从我的maven构建中写出一个version.txt文件,这是我的version.txt文件内容:
WarFilename: ${project.build.finalName}-${maven.build.timestamp}.war
BuildVersion: ${project.version} (build number ${build.number})
但是当我从构建输出转到version.txt时,除了$ {maven.build.timestamp}之外,所有值都已插入,这看起来就像那样。是否有将这些信息注入version.txt文件?
这是来自我的pom.xml文件:
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/version.txt</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/version.txt</exclude>
</excludes>
</resource>
</resources>
但我不确定如何配置它以便能够将maven.build.timestamp值写入version.txt文件,任何帮助都非常感谢,我对maven来说是全新的。< / p>