whoknows
whoknows

Reputation: 306

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.

Upvotes: 6

Views: 3437

Answers (1)

Truong Nguyen
Truong Nguyen

Reputation: 484

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.

Upvotes: 2

Related Questions