You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Dominique Devienne <DD...@lgc.com> on 2002/12/13 18:45:12 UTC
RE: possible to have variables in tasks?
All properties set during the execution of the target called by <antcall>
are lost (out-of-scope) when the <antcall> _returns_! And the usual
immutability rule still applies. One must can dependent targets executed
conditionally (using if/unless attributes) to set properties visible to
others tasks. --DD
-----Original Message-----
From: Andy Kriger [mailto:akriger@greaterthanone.com]
Sent: Friday, December 13, 2002 11:49 AM
To: Ant-User
Subject: possible to have variables in tasks?
I have an antcall that sets some parameters.
Can the task being called dynamically define params/properties based on the
incoming parameters?
Example:
Target Source calls Target Target with Param test="test"
I want Target to be able to define a number of params within it using
test="test" that will be reused by various tasks (e.g. mkdir, java, javac,
jar).
Is this possible?
thx
andy
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: possible to have variables in tasks?
Posted by Andy Kriger <ak...@greaterthanone.com>.
Even w/in the ant task being called by antcall, you cannot set
properties/params based on the incoming params?
Example:
<target name="caller">
<antcall target="callee">
<param name="type" value="tst">
</antcall>
</target>
<target name="callee">
<!-- I know this doesn't work but this is what I'm after -->
<param name="dir.src" value="/src-${type}"/>
<param name="dir.clz" value="/clz-${type}"/>
</target>
-----Original Message-----
From: Dominique Devienne [mailto:DDevienne@lgc.com]
Sent: Friday, December 13, 2002 12:45
To: 'Ant Users List'
Subject: RE: possible to have variables in tasks?
All properties set during the execution of the target called by <antcall>
are lost (out-of-scope) when the <antcall> _returns_! And the usual
immutability rule still applies. One must can dependent targets executed
conditionally (using if/unless attributes) to set properties visible to
others tasks. --DD
-----Original Message-----
From: Andy Kriger [mailto:akriger@greaterthanone.com]
Sent: Friday, December 13, 2002 11:49 AM
To: Ant-User
Subject: possible to have variables in tasks?
I have an antcall that sets some parameters.
Can the task being called dynamically define params/properties based on the
incoming parameters?
Example:
Target Source calls Target Target with Param test="test"
I want Target to be able to define a number of params within it using
test="test" that will be reused by various tasks (e.g. mkdir, java, javac,
jar).
Is this possible?
thx
andy
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>