Maven + system Date


I'm working in a project that already have a build process running with maven.

Today the build generates a zip file in a given directory, but I need to add the DATE pattern in the file, something like

Someone have any clue?

Thanks in advance

Best Solution

Using the build-number-maven-plugin allows you to generate a property that can then be used in the finalName property.

The following configuration sets a timestamp property with the format you required, then modifies the finalName to use that property and result in an artifact with that name being output to the target directory.

Note that this name is ignored when installing/deploying the artifact, otherwise Maven would not be able to reliably locate artifacts.