Inject Build Time (timestamp) Property Using Maven
28th May 2007 - By Aaron
In your pom.xml you have the ability to turn on resource filtering that replaces variables in resource files with actual values. These are useful for things like ${pom.name} and ${pom.version}. Your pom.xml section would look something like this…
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
And your properties file could contain something like these
# Build Time Information
APPLICATION.NAME=${pom.name}
APPLICATION.VERSION=${pom.version}Posted in Programming | 2 Comments »