Maven Timestamp Support: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=External= * http://stackoverflow.com/questions/802677/adding-the-current-date-with-maven2-filtering =Internal= * Maven =Overview= Define the following...")
 
Line 20: Line 20:
     ...
     ...
</project>
</project>
<pre>
</pre>


The timestamp will then be available for replacement and filtering as "release_date".
The timestamp will then be available for replacement and filtering as "release_date".

Revision as of 18:50, 16 November 2016

External

Internal

Overview

Define the following properties:

<project ...>
    ...
    <properties>
        <maven.build.timestamp.format>MM/dd/yy</maven.build.timestamp.format>
        <release_date>${maven.build.timestamp}</release_date>
    </properties>
    ...
</project>

The timestamp will then be available for replacement and filtering as "release_date".