You might like to try war:install/deploy-snapshot which does this
automatically with a UTC timestamp on the end as the version.

To get a date yourself, are you sure there isn't a jelly taglib for that? I
thought there was a <fmt:/> or something, after all it is mimicing a lot of
JSTL.

You could also use an appropriate ant tag (although its been so long I've
forgotten what its called - <tstamp/> I think).

Cheers,
Brett

> -----Original Message-----
> From: Keith Irwin [mailto:[EMAIL PROTECTED] 
> Sent: Friday, 16 January 2004 10:21 AM
> To: Maven Users List
> Subject: Constructing Dates on the Fly?
> 
> 
> Folks--
> 
> I need to rename my war file to meet some hosting / 
> production /process requirement.
> 
> Changing the name is no problem.
> 
> However, I'd like to be able to insert a date in the middle 
> of it so I can do something like:
> 
>       project-date-lifecycle.war
> 
> Is there an obvious way to get a date (and format it) using 
> jelly or some other thing in maven.xml?
> 
> Perusing the jelly core tags, I suppose I could instantiate a 
> jave.util.Date object, then a simple date formatter object, 
> but that seems like a lot of work.
> 
> Alternately, I could manually change the <currentVersion/> 
> element in project.xml, or use some other property I manually 
> set (using -D for instance), but, well, it would be ever so 
> much nicer if there was something like:
> 
>       <j:setDate var="mydate" when="current" format="yyyy-MM-dd"/>
> 
> Do I dare hope?
> 
> Keith
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Reply via email to