ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: AW: AW: Checking for avaliablity of file
Date Wed, 11 Aug 2004 09:16:25 GMT
maybe your file (gu_hrd.distrib) is present (so the target is executed)
but you dont read the properties (therefore they are printed as ${name}).

Jan

> -----Ursprüngliche Nachricht-----
> Von: Pritesh saharey [mailto:pritesh@sqatester.com]
> Gesendet am: Mittwoch, 11. August 2004 11:12
> An: user@ant.apache.org
> Betreff: Re: AW: AW: Checking for avaliablity of file
> 
> <available> is not working, the target is getting executed 
> irrespective of file is available or not, actully from 
> gu_hrd.distrib file 
> i am reading 5 values which has to be written to some other 
> file now the values which i am geeting is like this 
> 
> gu_hrd.distrib
> --------------
> previous_value 0089
> present_value 0093
> applied_value 7101
> assigned_value 8712
> version_value 009
> 
> and the values which are getting printed is like this
> ${previous_value}-${present_value}-${assigned_value}
> 
> this means varibales are getting printed and not the values, 
> and my build.xml file looks like this
> 
> build.xml
> ---------
> <available file="gu_hrd.distrib" property="gu_hrd.distrib-present">
>     <filepath>
>         <fileset dir="/home/pritu/verify"/>
>     </filepath>
> </available>
> 
> <target name="move-along" depends="clear" if="gu_hrd.distrib-present">
>     <echo>gu_hrd.distrib present</echo>
>     <replaceregexp  file="Applied.dat">
> 			<regexp pattern="version_format (.*?)=(.*?);"/>
>             <substitution expression="version_format = 
> &quot;${previous_value}-${present_value}-${assigned_value}&quot;;"/>
>         </replaceregexp>
> </target>
> 
> and Applied.dat looks like this after i run my build.xml
> 
> Applied.dat
> -----------
> version_format = ${previous_value}-${present_value}-${assigned_value}
> 
> which should look like this
> version_format = 0089-0093-8712
> 
> any help will be highly apperitieted
> 
> pritu
> 
> 
> 
> 
> --- Jan.Materne@rzf.fin-nrw.de wrote:
> <available file="gu_hrd.distrib" property="gu_hrd.distrib-present">
>     <filepath>
>         <fileset dir="/home/pritu/verify"/>
>     </filepath>
> </available>
> 
> <target name="move-along" if="gu_hrd.distrib-present">
>     <echo>gu_hrd.distrib present</echo>
> </target>
> 
> 
> Jan
> 
> 
> 
> > -----Ursprüngliche Nachricht-----
> > Von: Pritesh saharey [mailto:pritesh@sqatester.com]
> > Gesendet am: Mittwoch, 11. August 2004 09:03
> > An: user@ant.apache.org
> > Betreff: Re: AW: Checking for avaliablity of file
> > 
> > Thanks Jan for your quick reply but I already used 
> > <available> its not working, please suggest some other solution.
> > 
> > pritu
> > 
> > 
> > 
> > 
> > --- Jan.Materne@rzf.fin-nrw.de wrote:
> > <available> ?
> > 
> > Jan
> > 
> > > -----Ursprüngliche Nachricht-----
> > > Von: Pritesh saharey [mailto:pritesh@sqatester.com]
> > > Gesendet am: Mittwoch, 11. August 2004 08:35
> > > An: user@ant.apache.org
> > > Betreff: Checking for avaliablity of file
> > > 
> > > Hi All,
> > > I want to check for a file whether it exsist or not in a 
> > > particular path how can it be checked, suppose there is a file at
> > > /home/pritu/verify/gu_hrd.distrib and in my build.xml file 
> > > there is target <target name="move-along"> which is dependent 
> > > on the avaliability
> > > of this gu_hrd.distrib file, so i wanted to check that untill 
> > > and unless this file exsist at its particular location target 
> > > move-along should 
> > > not get executed and build should stop with message that 
> > > "gu_hrd.distrib file does not exsist at /home/pritu/verify"
> > > can anyone help me out?
> > > 
> > > pritu
> > > 
> > > 
> > > 
> > > 
> > > _____________________________________________________________
> > > Join SQAtester.com Community  ---> 
> > > http://www.sqatester.com/testersarea/joinus.htm
> > > 
> > > 
> > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > > For additional commands, e-mail: user-help@ant.apache.org
> > > 
> > 
> > 
> > _____________________________________________________________
> > Join SQAtester.com Community  ---> 
> http://www.sqatester.com/testersarea/joinus.htm
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> _____________________________________________________________
> Join SQAtester.com Community  ---> 
http://www.sqatester.com/testersarea/joinus.htm

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message