I am trying to find out if Maven has some built-in plug-in that can be used to time-stamp artifacts. I created an assembly file and am using the maven-assembly plugin to create a final distribution (jars,docs,scripts, etc). I want to name this distribution file as domain_year_month_day.zip. How can I append the day portion of a timestamp to the end of the final zip file that is being produced. Thanks.
You don't need the maven-timestamp-plugin with newer versions of maven. Since 2.1'ish, Maven has provide the special property maven.build.timestamp.
You set the format in the pom properties with something like this:
<maven.build.timestamp.format>yyyy-MM-dd'T'HH.mm.ss</maven.build.timestamp.format>
And then use ${maven.build.timestamp} wherever you need a timestamp property. See http://maven.apache.org/guides/introduction/introduction-to-the-pom.html for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With