ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Using Shellscript variable in build.xml
Date Fri, 22 Jan 2010 10:31:05 GMT
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: jhoomsharabi@netscape.net [mailto:jhoomsharabi@netscape.net] 
>Gesendet: Freitag, 22. Januar 2010 10:05
>An: user@ant.apache.org
>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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message