You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Doug Lochart <dl...@capecomputing.com> on 2004/01/22 18:51:24 UTC

property visibility confusion

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 ) {
       project.setProperty("some.property","some.value");
    }

    ]]>  </script>

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

... later on in the build file

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

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

thanks

Doug


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.

rexec hangs on Ant 1.6

Posted by Basel Ahmed <B0...@FDS.com>.
Has anyone experienced this issue with rexec where it hangs?

I have a very simple build.xml to test rexec.  The rexec tasks looks like 
this

        <rexec userid="myuid" password="mypass" server="servername" 
command="ls -l" />


When ant executes this task, it seems to go on vacation and never comes 
back.

Any thoughts?

Basel Ahmed
Federated Systems Group
Site Build & Launch (Duluth)

"Extraordinary results demand extraordinary measures."