ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clifton C. Craig" <...@icsaward.com>
Subject Re: How to use the script tag
Date Fri, 23 Jan 2004 16:21:15 GMT
Peter,

You just hinted to something important. I do have another version of 
beanshell in my jre/lib/ext folder. Depending how things are implemented 
this could cause trouble if dynamic classloading is used. I'll try 
removing it from my ext folder temporarily and see if that remedies the 
situation. I'll post back. Thanks everyone.

Clifton C. Craig, Software Engineer
Intelligent Computer Systems -  A Division of GBG
2101 Embassy Drive
Lancaster, PA  17603

Phone:  717-295-7977 ext. 621
Fax:  717-295-7683
ccc@icsaward.com
ccraig@globalbeveragegroup.com
****************************************************************************



Peter Reilly wrote:

> Bernd Matzke wrote:
>
>> Hi,
>> when I test your example,I had the same problem. But after changing the
>> target name it works very well. Try
>>
>>  
>>
> Well done!
> default is a javascript keyword so this  default.addTask() would cause 
> grief.
>
>>    <target name="def">
>>        <script language="javascript">
>>            <![CDATA[
>>                for (i=1; i<=10; i++)
>>                {
>>                    echo = project.createTask("echo");
>>                    def.addTask(echo);
>>                    echo.setMessage("Number: " + i);
>>                }
>>            ]]>
>>        </script>
>>
>> Regards
>>         Bernd
>>
>>
>> -----Original Message-----
>> From: Clifton C. Craig [mailto:ccc@icsaward.com]
>> Sent: Mittwoch, 21. Januar 2004 20:26
>> To: Ant Users List
>> Subject: How to use the script tag
>>
>>
>> Hello all:
>>
>> I am having trouble getting the script tag to work in Ant 1.6.0. I 
>> have tried various renditions to get the following code to run:
>> <?xml version="1.0"?>
>> <project default="default" basedir="." name="Neware">
>>    <description>
>>    This is a test script for experimental use.
>>    </description>
>>    <!-- 
>> =================================================================== -->
>>    <!-- Basic build targets for the 
>> project                                 -->
>>    <!-- 
>> =================================================================== -->
>>    <target name="default">
>>        <script language="javascript">
>>            <![CDATA[
>>                for (i=1; i<=10; i++)
>>                {
>>                    echo = project.createTask("echo");
>>                    default.addTask(echo);
>>                    echo.setMessage("Number: " + i);
>>                }
>>            ]]>
>>        </script>
>>    </target>
>> </project>
>>
>> It is slightly modified from what's in the Ant documentation under 
>> the script tag link. I have tried all combinations of versions of the 
>> BSF and Rhino jars and have finally settled on what is recomended in 
>> the Ant docs: BSF 2.3.0-rc1 and rhino 1.5R3. I run under this 
>> combination and I get: SyntaxError: syntax error (<ANT>; line 5)
>> Could someone please tell me what I'm doing wrong? Also what language 
>> values and jar combos do I need to use other languages like 
>> beanshell? I dropped bsh-2.0b1 into ant/lib and changed the language 
>> on the above to 1st "java" and then "beanshell" trying to get it to 
>> work. I got different errors on both: "ClassNotFoundException: 
>> org.apache.bsf.engines.java.JavaEngine" and "NoClassDefFoundError: 
>> org/apache/bsf/util/BSFEngineImpl" respectively. I'd really like to 
>> use  
>>
> I use bsh-2.0b1 fine. Maybe you have the a wrong version of bsf 
> somewhere in the
> classpath.
>
> Peter
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>

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


Mime
View raw message