ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Lochart" <>
Subject property visibility confusion
Date Thu, 22 Jan 2004 17:51:24 GMT
Ok, I have been using ant for quite some time now but I seem to have run across something I
do not understand.

I have a beanshell script inside of a target.  It contains the following lines of code

<target name="test">

    <script language="beanshell"> <![CDATA[
    if ( booleanCondition ) {

    ]]>  </script>

    <echo message="[1] property is ${}"/>

... later on in the build file

<target name="nextTarget">
   <echo message="[2] property is ${}"/>

Ok, where the echo's occur [1] echos the value of the property.  In the "nextTarget" which
executes after "test" target does the
echo value does not display the value of the property as if it was unset.  Is this a bug in
the way changes are made to a project
from within a script?  It seems as long as you are within the same target where the script
set a property you can see it.  When you go to the next
target in the same build file (same project) the property is not there.

I know I have set properties in targets before and then referred back to them in other targets.
 Can anyone shed any light on what might be happening.
I am using ant1.6beta, bsf2.3.0 and beanshell 1.3



Now I've gained some understanding 
Of the only world that we see.
Things that I once dreamed of
Have become reality.

These walls that still surround me
Still contain the same old me,
Just one more who's searching for
A world that ought to be.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message