Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Milliseconds format in maven.build.timestamp

this is my scenario, it's pretty simple but am afraid it took me 2 days already.

In my pom.xml, I have this set of properties.

<properties>
    <timestamp>${maven.build.timestamp}</timestamp>
    <maven.build.timestamp.format>yyyyMMdd-HHmmssSSS</maven.build.timestamp.format>
</properties>

The format is fine because I've got milliseconds in it, however, I wanted to have just milliseconds, like the one returned in,

date.getTime();

Can we do that in Maven plugins? Thanks.

like image 611
whoknows Avatar asked Aug 18 '14 07:08

whoknows


1 Answers

you can have a look at this plugin: http://www.mojohaus.org/buildnumber-maven-plugin/create-timestamp-mojo.html. By default, it returns time in milliseconds.

like image 67
Truong Nguyen Avatar answered Oct 14 '22 20:10

Truong Nguyen