[
http://jira.codehaus.org/browse/MNG-2562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=182191#action_182191
]
Matthew McCullough commented on MNG-2562:
-----------------------------------------
Per Wendy's last comment captured from benson0 and Jason, I'm after the same
thing. I have a .properties file that is part of our filtered resources that I
want to put the timestamp into. If I put ${build.timestamp} into the
.properties file it isn't replaced. I see this interpolation in the source of
the 2.2.0 branch of Maven, which we are using, in the file
maven-project/src/main/java/org/apache/maven/project/interpolation/BuildTimestampValueSource.java
Even though I couldn't get it to work "raw", I did find a workaround. If I put
<properties>
<mytimestamp>${build.timestamp}</mytimestamp>
</properties>
into the pom.xml and then use ${mytimestamp} in the .properties file, it indeed
does expand to 20090701-1656.
> expose current time as a property for POM interpolation
> -------------------------------------------------------
>
> Key: MNG-2562
> URL: http://jira.codehaus.org/browse/MNG-2562
> Project: Maven 2
> Issue Type: New Feature
> Components: Inheritance and Interpolation
> Reporter: Brett Porter
> Assignee: John Casey
> Fix For: 2.1.0-M1
>
>
> it is useful to have the current time, for example to write out a manifest
> entry for the build time or to filter into another file.
> I'm not sure of the best way to make the format of the time configurable -
> perhaps another POM element/property.
> See the related issue for a current example of how this can be done, but it
> would be nice to have a built-in.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira