RE: Constructing Dates on the Fly?
On Thu, 2004-01-15 at 15:35, Brett Porter wrote: > 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 or something, after all it is mimicing a lot of > JSTL. Yeah, I was looking at that. It would be great, but you know, they never have any examples in their docs, so I have to go scraping through plugins hoping to find something, which is how I found: > You could also use an appropriate ant tag (although its been so long I've > forgotten what its called - I think). Exactly. Worked like a dream. ;) See my reply to my reply. The production guys want three builds for three environments so I now have a goal that does them all at once. Keith > 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 > > 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: > > > > > > > > Do I dare hope? > > > > Keith > > > > > > - > > 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]
Re: Constructing Dates on the Fly?
Ah hah! I knew if I wrote to the list it would speed my discovery. This seems to work: Easy! :) Keith On Thu, 2004-01-15 at 15:21, Keith Irwin wrote: > 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 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: > > > > Do I dare hope? > > Keith > > > - > 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]
RE: Constructing Dates on the Fly?
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 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 - 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 > 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: > > > > Do I dare hope? > > Keith > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >