ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vineet Bhatia <Vineet_Bha...@ocs.com>
Subject Re: How to get property value in task arguments?
Date Wed, 17 Jan 2001 16:44:03 GMT
Ah got it!!
I did not put the depends on the target "main"
It should be like this -

 <target name="init">
 	<property name="prop1"  value="prop1 value" />
 	<property name="prop2" value="prop2 value" />
 	<property name="prop3" value="prop3 value" />
 ...
 ...
 </target>
 <target name="main" depends="init">
         <myTask arg1="${prop1}"
                 arg2="${prop2}"
                 arg3="${prop3}"
                 blah="blah"
         />
 </target>

Sorry. I'm a newbie :)

- vineet


Ioan Mitrea wrote:

maybe the properties prop1 prop2 prop3 were already assigned values
before you declared them: they were set in an properties file or they
were inherited from
a parent project ?
  
Ioan


Vineet Bhatia wrote:
> 
> Hi all,
> 
> I have written a task which makes use of the VSSGET task.
> In my build.xml file I invoke it like this -
> 
> ...
> ...
> <property name="prop1"  value="prop1 value" />
> <property name="prop2" value="prop2 value" />
> <property name="prop3" value="prop3 value" />
> ...
> ...
> <target name="main">
>         <myTask arg1="${prop1}"
>                 arg2="${prop2}"
>                 arg3="${prop3}"
>                 blah="blah"
>         />
> </target>
> 
> For some reason this does not work.
> I do not get the value of the argument for myTask.
> I get ${prop1} as the value for arg1??
> What am I doing wrong?
> 
> - vineet

Mime
View raw message