Generate Timestamp Maven

Generate Timestamp Maven

By default maven is not configure to create unique build number when you package you project. This is required if you are using continuous build tools to generate project archive. By default maven generate the artifact using you project artifactId and version. So if you project has below:

  • It will generate artifact as below when you package or intall your project:

Generate Timestamp Maven

  • Each time if you take build it will generate the same version. To change this behavior and if you want to include unique version every time you could include time-stamp in it so please modify your pom.xml, include below properties:

  • Now after adding this every time when you take build it will generate unique artifact which include time-stamp as below:

2015-10-26 23_19_22-Java EE - GenerateBuildNumber_pom.xml - Eclipse


  • For more information please read maven documentation here

Leave a Reply

Your email address will not be published. Required fields are marked *

I am not Robot *