James,
Just in case you're interested or want to do more formatting with the date, I believe this is a Jellified
version where you can set up the format...
<!-- create a Java Date instance for 'today' -->
<new var="now" className="java.util.Date"/>


   <!-- create a Java Date formatter -->
 <new var="formatter" className="java.text.SimpleDateFormat">
           <arg value="EEE dd/MM/yy"/>
  <new>

<!-- create a new jelly variable (xx) from the output of putting the date through the formatter -->
<invoke var="xx" on="${formatter}" method="format">
<j:arg value="${now}"/>
</j:invoke>
<!-- display the variable -->
The time according to jelly is ${xx}


   Regards
         Andy

You can use <tstamp/> (which is an ant tag). It set 2 properties DSTAMP
and TSTAMP with date and time (see ant documentation for more details)

Ex:

<tstamp/>
<property name="log.filename" value="log-${DSTAMP}.${TSTAMP}.log"/>



Great! That's exactly what I was after and I just couldn't find it.




-----Message d'origine-----
De : James CE Johnson [mailto:[EMAIL PROTECTED]
Envoy� : mercredi 16 juillet 2003 16:27
� : [EMAIL PROTECTED]
Objet : Getting current date/time?


Hey all,


Is there any way for my maven.xml to fetch the current date/time so that
I can subsequently write (using <echo...) it to a file?

Thanks,
James





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to