ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Clayton <john_clay...@pobox.com>
Subject Re: beanshell script help needed...
Date Sun, 16 Jun 2002 09:36:38 GMT
ok, I'm silly.

I had a variable name with an underscore - which is why the beanshell 
was not seeing it.  Presumably only names that match the regexp 
[a-zA-z][a-zA-Z_] pattern are automagically imported into the beanshell?

john

John Clayton wrote:

> Hi, I've read the Doc on <script> but it's a little thin on how I go 
> about accessing the properties declared in my build.xml.  I can see 
> that it's possible to access the tasks, fileset ref's etc - but I am 
> not capable of direct osmosis of class files.
>
> :-)
>
> I know the beanshell is working because simple code that prints 
> strings to the console works ok.
>
> If you have a link that can show me the way, I'd really appreciate it! 
> And just in case it's not clear, here's what I want to do:
>
> <property name="compile-cmd" value="${gen.home}/compile-cmd"/>
> .
> .
> .
> <target name="perform-compile" if="compile-cmd-exists">
>        <replace file="${compile-cmd}">
>            <replacefilter token="/Fo " value="/Fo"/>
>        </replace>
>
>        <script language="beanshell"> <![CDATA[
>        // for each line, take it - replace appropriate
>        // things and then run it, if the task fails - we stop processing.
>              // open the compile-cmd file.
>        // boom - not a variable it seems. what a shock!
>        print(compile-cmd);                      ]]>
>       </script>
>
> Thanks again!
>
> john c
>
>
>
>




--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message