You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mark Imel <mi...@imelshire.com> on 2003/02/04 22:57:27 UTC
Passing properties from ant targets
I'm trying to get a property that i set in a called ant target from the 'parent' ant target.
For example:
<target name="parent">
<antcall target="child" />
<echo message="${child.property}" />
</target>
<target name="child">
<input message="Please enter property value" addproperty="child.property" />
</target>
In this example the echoed value is the "${child.property}", instead of the user input.
Any suggestions, or is this even possible?
Regards,
--Mark Imel
Re: Passing properties from ant targets
Posted by Mike Castle <da...@ix.netcom.com>.
In article <00...@netegrity.com>,
Mark Imel <an...@jakarta.apache.org> wrote:
>Any suggestions, or is this even possible?
Not possible directly.
Use the <propertyfile file="..."/> task in the called target to create
a property file, then use <property file="..."/> in the caller to load it.
mrc
--
Mike Castle dalgoda@ix.netcom.com www.netcom.com/~dalgoda/
We are all of us living in the shadow of Manhattan. -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc