opensubscriber
   Find in this group all groups
 
Unknown more information…

u : user@ant.apache.org 13 September 2009 • 6:32AM -0400

How add global property with input task?
by don rhummy

REPLY TO AUTHOR
 
REPLY TO GROUP




When I have an Input task with "addProperty", the property it creates is only valid within that one target. So if two targets are being called in the same build run, the property added by the input task in target "1" is not visible in target "2"!! How would I add it globally?

The below two examples BOTH have the property "newProp" as existing only in target "one":

EXAMPLE ONE
------------
<target name="one">
     <input message="Enter something:" addProperty="newProp" />
</target


<target name="two">
     <!-- Should NOT be called -->
     <input message="Enter something:" addProperty="newProp" />
</target

//Command prompt call
mycomp> ant one two


EXAMPLE TWO
------------
<target name="one">
     <input message="Enter something:" addProperty="newProp" />
</target


<target name="two">
     <!-- Should NOT be called -->
     <input message="Enter something:" addProperty="newProp" />
</target

<target name="three">
     <antcall target="one" />
     <antcall target="two" />
</target

//Command prompt call
mycomp> ant three



      

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

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.