I am upgrading a large build-system to use Maven2 instead of Ant, and we have two related requirements that I'm stuck on:
We need to generate a time-stamped artifact, so a part of the package phase (or wherever), instead of building
project-1.0-SNAPSHOT.jar
we should be building
project-1.0-20090803125803.jar
(where the
20090803125803
is just aYYYYMMDDHHMMSS
time-stamp of when the jar is built).The only real requirement is that the time-stamp be a part of the generated file's filename.
The same time-stamp has to be included within a version.properties file inside the generated jar.
This information is included in the generated pom.properties when you run,
e.g., mvn package
but is commented out:
#Generated by Maven
#Mon Aug 03 12:57:17 PDT 2009
Any ideas on where to start would be helpful! Thanks!