Millisecond format in maven.build.timestamp

This is my script, it’s pretty simple, but I'm afraid it took me 2 days.

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 great because it has milliseconds, but I wanted to have only milliseconds, for example, the one that came back,

 date.getTime(); 

Can we do this in Maven plugins? Thanks.

+5
source share
1 answer

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

+1
source

Source: https://habr.com/ru/post/1200568/


All Articles