How to adjust build date with maven build module

In the build pom, with
1.0.0

the module gateway page mention :
1.0.0 (b0)

How to set the build date like IA module :
1.0.0 (b2016030813)

1.0.0 ${maven.build.timestamp}
don’t work.

:scratch:

The gateway simply extracts the fourth element of your version number and formats it as “b(nnnnnnnn)”. In your final .modl file, you should end up with:<version>1.0.0.12345678</version>Note that each element of a version must fit within a 32-bit integer, so you can’t just go wild. I format the build date as “YYMMDDHHmm”, which will work for the next several years.
I haven’t switched to maven yet, so you’ll have to work out how to format and insert the build date in your pom.xml.

1 Like

Adding this code into the pom do the job !


<properties>
  <timestamp>${maven.build.timestamp}</timestamp>
  <maven.build.timestamp.format>yyyyMMddHH</maven.build.timestamp.format>
</properties>

<moduleVersion>1.0.0.${timestamp}</moduleVersion>
3 Likes