You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Vineet Bhatia <Vi...@ocs.com> on 2001/01/17 02:04:04 UTC

How to get property value in task arguments?

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


Re: How to get property value in task arguments?

Posted by Ioan Mitrea <io...@lutris.com>.
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
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: ant-dev-help@jakarta.apache.org