AW: Ant: get today's date and replace old date

2005-01-26 Thread Jan . Materne
> > PROBLEM 2: > > > > Then I want to replace the date in the file below. > > It looks like the Replace task won't work because it cannot > do a wildcard > > search. This is what I've been using: > > > > sed "s/build...*)/build date: $DATE)/" < $VERSION_PROPERTIES > > > $VERSION_PROPERTIES_N

AW: AW: Last element of current directory name.

2005-01-26 Thread Jan . Materne
oh, you can use other languages as well, python, groovy, bsh, ... it has to be supported by then BeanScriptingFramework. Jan > -Ursprüngliche Nachricht- > Von: Nat Gross [mailto:[EMAIL PROTECTED] > Gesendet am: Mittwoch, 26. Januar 2005 16:44 > An: Ant Users List > Betreff: Re: AW: Last e

Re: Ant: get today's date and replace old date

2005-01-26 Thread Douglas Kramer
Douglas Kramer wrote: PROBLEM 1: I want to set the date in the version.properties file of my project. In the past I've used this Unix command to get today's date: DATE=`date '+%d %b %Y'` // 26 Jan 2005 That is, how can I set the date and assign it to a variable in Ant? Okay, I found so tha

Ant: get today's date and replace old date

2005-01-26 Thread Douglas Kramer
PROBLEM 1: I want to set the date in the version.properties file of my project. In the past I've used this Unix command to get today's date: DATE=`date '+%d %b %Y'` // 26 Jan 2005 That is, how can I set the date and assign it to a variable in Ant? PROBLEM 2: Then I want to replace the date

Re: accessing the verbose state

2005-01-26 Thread Matt Benson
--- michael sorens <[EMAIL PROTECTED]> wrote: > Basically I was considering having a non-Task java > class to provide more or less output if run from ant > and if verbose is set or not. But this is not a > high-priority issue... > > Also, I found the answer to (1) -- takes a > level just as the

Re: accessing the verbose state

2005-01-26 Thread michael sorens
Basically I was considering having a non-Task java class to provide more or less output if run from ant and if verbose is set or not. But this is not a high-priority issue... Also, I found the answer to (1) -- takes a level just as the listeners you described for custom tasks, I found. On Wed,

Re: accessing the verbose state

2005-01-26 Thread Matt Benson
--- michael sorens <[EMAIL PROTECTED]> wrote: > Thank you, Matt, for such a prompt answer to (2) and > (4). > Anyone else have any thoughts on (1) and (3)? Matt > implies "can't be done"... To elaborate further, a custom BuildLogger is not a custom task and thus falls more under the (3) category

Re: accessing the verbose state

2005-01-26 Thread michael sorens
Thank you, Matt, for such a prompt answer to (2) and (4). Anyone else have any thoughts on (1) and (3)? Matt implies "can't be done"... On Wed, 26 Jan 2005 13:45:15 -0800 (PST), Matt Benson <[EMAIL PROTECTED]> wrote: --- michael sorens <[EMAIL PROTECTED]> wrote: From the command line, one may use

Re: accessing the verbose state

2005-01-26 Thread Matt Benson
--- michael sorens <[EMAIL PROTECTED]> wrote: > From the command line, one may use -v to get more > verbose output. > How is this verbose-state accessed... > (1) ...from within the build file (i.e. ant property > presumably) ? > (2) ...from within a custom task ? > (3) ...from within a generic Ja

accessing the verbose state

2005-01-26 Thread michael sorens
From the command line, one may use -v to get more verbose output. How is this verbose-state accessed... (1) ...from within the build file (i.e. ant property presumably) ? (2) ...from within a custom task ? (3) ...from within a generic Java class, if possible ? (4) Are there guidelines for what cons

Re: putting value in txtfile

2005-01-26 Thread Matt Benson
--- Erik Hatcher <[EMAIL PROTECTED]> wrote: > Um nevermind. I missed the part that there > is "just a blank > line". A custom FilterReader would work - have it > only affect the 4th > line. > > Erik All you have to match is the line break count, so assuming you know what those a

Re: AW: Last element of current directory name.

2005-01-26 Thread Nat Gross
Hey! I didn't know you can use Javascript in Ant, (not that I know Javascript well, but still..) it's cool. Thanks -nat ps. oh, thats what Matt meant by 'using a script'. [EMAIL PROTECTED] wrote: The upcase part can be done with

Re: putting value in txtfile

2005-01-26 Thread Erik Hatcher
Um nevermind. I missed the part that there is "just a blank line". A custom FilterReader would work - have it only affect the 4th line. Erik On Jan 26, 2005, at 8:55 AM, Erik Hatcher wrote: task or the replaceregex filter reader on a would do the trick, I think. Erik

Re: putting value in txtfile

2005-01-26 Thread Ninju Bohra
You might want to read up on the task along with the nested elements. One route... Write your property out to a temp file Use the along with sub-element to concat the first 3 lines of the orginal file with the temp file (stored in another file). Then use another (with sub-element) to take

AW: Load filename as property ?

2005-01-26 Thread Jan . Materne
or with But from Ant´s point of view there could be multiple files! Jan > -Ursprüngliche Nachricht- > Von: Rebhan, Gilbert [mailto:[EMAIL PROTECTED] > Gesendet am: Mittwoch, 26. Januar 2005 14:24 > An: user@ant.apache.org > Betreff: Load filename as property ? > > > Hi, > > i wa

AW: Last element of current directory name.

2005-01-26 Thread Jan . Materne
The upcase part can be done with

Re: putting value in txtfile

2005-01-26 Thread Erik Hatcher
task or the replaceregex filter reader on a would do the trick, I think. Erik On Jan 26, 2005, at 8:31 AM, Rebhan, Gilbert wrote: Hi, yet another txtfileprocessing question. File looks like that : 01 bla 02 bla 03 bla 04 05 06 07 bla 08 bla 09 bla How to put the value of a property on l

ant 1.6.x libraries

2005-01-26 Thread Melzer, Steven
all, i am trying to move from ant 1.5.x on Windows to ant 1.6.x on Unix and i am having a hard time understanding the proper way to handle external libraries. i started with a clean version of redhat 9. it has ant 1.5.x pre-installed. i used the jpackage and upgraded it to 1.6.x (after a trem

putting value in txtfile

2005-01-26 Thread Rebhan, Gilbert
Hi, yet another txtfileprocessing question. File looks like that : 01 bla 02 bla 03 bla 04 05 06 07 bla 08 bla 09 bla How to put the value of a property on line 4 ? The rest of the file should remain as it is. Problem : no tokens like @...@ there, just a blank line The linenumber, where the

Load filename as property ?

2005-01-26 Thread Rebhan, Gilbert
Hi, i want the filename of a txtfile set as property. The directory contains other files beside that txtfile. example = dir file1.xxx file2.txt file3.xxx file4.xxx The resulting property should be file2.txt Any ideas ? Gilbert --