You must set the property in the Ant project instance.
Not familiar with the bash-syntax ... so a JS code
project.setNewProperty("KAR", KAR);
- "KAR" is the name of the Ant property
- KAR is the reference of the variable inside the <shellscrip> block
Jan
>-----Ursprüngliche Nachricht-----
>Von: [email protected] [mailto:[email protected]]
>Gesendet: Freitag, 22. Januar 2010 10:05
>An: [email protected]
>Betreff: Using Shellscript variable in build.xml
>
>I am using shellscript task of ant-contrib in one of my
>target, which looks like this:
>
> <shellscript shell="bash">
>
> KAR=`echo ${adapter-active-directory} | awk -F.
>'{print $1}'`
> MAR=`echo ${adapter-active-directory} | awk -F.
>'{print $4}'`
>
> </shellscript>
>
> <echo message="First: ${KAR}"/>
> <echo message="Fourth: ${MAR}"/>
>
>
>How I can use the shell script variables "KAR" and "MAR"
>outside of shellscript task, like I am trying to echo the
>shell script variables but getting error
>
>Property "KAR" has not been set
> [echo] First: ${KAR}
>Property "MAR" has not been set
> [echo] Fourth: ${MAR}
>
>Any help in this regard will be highly appreciated.
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]