You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Clifton C. Craig" <cc...@icsaward.com> on 2004/01/21 20:25:44 UTC

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 
the script tag as it has good potential for what I need in my project 
right now but I need help. Thanks in advance.

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
****************************************************************************


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


Re: How to use the script tag

Posted by "Clifton C. Craig" <cc...@icsaward.com>.
I've tried the bsh-1.3.0 jar with the same results. I'll give Ant1.6.0b2 
a try. Thanks.

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
****************************************************************************



Doug Lochart wrote:

>I am using 1.6beta (still) with bsf2.3.0, RHINO15R3 and BeanShell at 1.3.0
>and all seems to work fine.
>I had trouble with Beanshell 2.0.  I have seen the same error message and it
>was an incompatibility issue.
>
>I hope this helps a little
>
>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.
>----- Original Message ----- 
>From: "Clifton C. Craig" <cc...@icsaward.com>
>To: "Ant Users List" <us...@ant.apache.org>
>Sent: Wednesday, January 21, 2004 2:25 PM
>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
>>the script tag as it has good potential for what I need in my project
>>right now but I need help. Thanks in advance.
>>
>>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
>>
>>    
>>
>****************************************************************************
>  
>
>>---------------------------------------------------------------------
>>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
>
>
>
>  
>

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


Re: How to use the script tag

Posted by Doug Lochart <dl...@capecomputing.com>.
I know this is a basic question but are you sure that the bsf.jar is in your
$ANT_HOME/lib directory?
All plugin/extension jars must be in the $ANT_HOME/lib for ant to find the
correct classes.

If you do and you are still having a problem then I suggest writing a very
small ant script with one
target using a simple beanshell script that does an echo task.  run it from
the command line (not in any fancy
scripts or anything) just to make sure its not some enviornment thing
happening.

I am sure you do but check and make sure that ANT_HOME is set correctly

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.
----- Original Message ----- 
From: "Clifton C. Craig" <cc...@icsaward.com>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Wednesday, January 21, 2004 3:50 PM
Subject: Re: How to use the script tag


> Ok, I'm using bsf.jar out of BSF 2.3.0-rc1 and bsh-1.3.0.jar with the
> value beanshell in the language attribute of the script tag. I'm
> getting: java.lang.NoClassDefFoundError:
> org/apache/bsf/util/BSFEngineImpl when I use either Ant1.6.0 or Ant
> 1.6.beta2. What gives? I finally got javascript to work after I changed
> the name of the default target from default to defaultTgt. I really want
> to use beanshell though. Am I missing a jar or is something else going
> wrong?
>
> 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
>
****************************************************************************
>
>
>
> Doug Lochart wrote:
>
> >I use "beanshell".  As far as 1.6beta was concerned bsf nor beanshell was
> >included in the distro.  I needed to get them myself along with rhino and
> >ant-contrib.
> >
> >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.
> >----- Original Message ----- 
> >From: "Clifton C. Craig" <cc...@icsaward.com>
> >To: "Ant Users List" <us...@ant.apache.org>
> >Sent: Wednesday, January 21, 2004 3:21 PM
> >Subject: Re: How to use the script tag
> >
> >
> >
> >
> >>Wait a minute. what value do you specify for the language attribute to
> >>use beanshell? Is it "beanshell"? I found nothing in the Ant docs and it
> >>seems there should be some sort of value listing like javascript,
> >>beanshell, jython, etc. When I use "beanshell" as the value it has
> >>trouble finding the BSFEngineImpl class. Is this supposed to ship with
> >>the BSF jar or the bsh-1.3.0.jar?
> >>
> >>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
> >>
> >>
> >>
>
>***************************************************************************
*
> >
> >
> >>
> >>Doug Lochart wrote:
> >>
> >>
> >>
> >>>I am using 1.6beta (still) with bsf2.3.0, RHINO15R3 and BeanShell at
> >>>
> >>>
> >1.3.0
> >
> >
> >>>and all seems to work fine.
> >>>I had trouble with Beanshell 2.0.  I have seen the same error message
and
> >>>
> >>>
> >it
> >
> >
> >>>was an incompatibility issue.
> >>>
> >>>I hope this helps a little
> >>>
> >>>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.
> >>>----- Original Message ----- 
> >>>From: "Clifton C. Craig" <cc...@icsaward.com>
> >>>To: "Ant Users List" <us...@ant.apache.org>
> >>>Sent: Wednesday, January 21, 2004 2:25 PM
> >>>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
> >>>>the script tag as it has good potential for what I need in my project
> >>>>right now but I need help. Thanks in advance.
> >>>>
> >>>>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
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
>
>>**************************************************************************
*
> >>
> >>
> >*
> >
> >
> >>>
> >>>
> >>>>---------------------------------------------------------------------
> >>>>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
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>---------------------------------------------------------------------
> >>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
> >
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> 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


Re: How to use the script tag

Posted by "Clifton C. Craig" <cc...@icsaward.com>.
Ok, I'm using bsf.jar out of BSF 2.3.0-rc1 and bsh-1.3.0.jar with the 
value beanshell in the language attribute of the script tag. I'm 
getting: java.lang.NoClassDefFoundError: 
org/apache/bsf/util/BSFEngineImpl when I use either Ant1.6.0 or Ant 
1.6.beta2. What gives? I finally got javascript to work after I changed 
the name of the default target from default to defaultTgt. I really want 
to use beanshell though. Am I missing a jar or is something else going 
wrong?

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
****************************************************************************



Doug Lochart wrote:

>I use "beanshell".  As far as 1.6beta was concerned bsf nor beanshell was
>included in the distro.  I needed to get them myself along with rhino and
>ant-contrib.
>
>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.
>----- Original Message ----- 
>From: "Clifton C. Craig" <cc...@icsaward.com>
>To: "Ant Users List" <us...@ant.apache.org>
>Sent: Wednesday, January 21, 2004 3:21 PM
>Subject: Re: How to use the script tag
>
>
>  
>
>>Wait a minute. what value do you specify for the language attribute to
>>use beanshell? Is it "beanshell"? I found nothing in the Ant docs and it
>>seems there should be some sort of value listing like javascript,
>>beanshell, jython, etc. When I use "beanshell" as the value it has
>>trouble finding the BSFEngineImpl class. Is this supposed to ship with
>>the BSF jar or the bsh-1.3.0.jar?
>>
>>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
>>
>>    
>>
>****************************************************************************
>  
>
>>
>>Doug Lochart wrote:
>>
>>    
>>
>>>I am using 1.6beta (still) with bsf2.3.0, RHINO15R3 and BeanShell at
>>>      
>>>
>1.3.0
>  
>
>>>and all seems to work fine.
>>>I had trouble with Beanshell 2.0.  I have seen the same error message and
>>>      
>>>
>it
>  
>
>>>was an incompatibility issue.
>>>
>>>I hope this helps a little
>>>
>>>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.
>>>----- Original Message ----- 
>>>From: "Clifton C. Craig" <cc...@icsaward.com>
>>>To: "Ant Users List" <us...@ant.apache.org>
>>>Sent: Wednesday, January 21, 2004 2:25 PM
>>>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
>>>>the script tag as it has good potential for what I need in my project
>>>>right now but I need help. Thanks in advance.
>>>>
>>>>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
>>>>
>>>>
>>>>
>>>>        
>>>>
>>***************************************************************************
>>    
>>
>*
>  
>
>>>      
>>>
>>>>---------------------------------------------------------------------
>>>>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
>>>
>>>
>>>
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>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
>
>
>
>  
>

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


Re: How to use the script tag

Posted by Doug Lochart <dl...@capecomputing.com>.
I use "beanshell".  As far as 1.6beta was concerned bsf nor beanshell was
included in the distro.  I needed to get them myself along with rhino and
ant-contrib.

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.
----- Original Message ----- 
From: "Clifton C. Craig" <cc...@icsaward.com>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Wednesday, January 21, 2004 3:21 PM
Subject: Re: How to use the script tag


> Wait a minute. what value do you specify for the language attribute to
> use beanshell? Is it "beanshell"? I found nothing in the Ant docs and it
> seems there should be some sort of value listing like javascript,
> beanshell, jython, etc. When I use "beanshell" as the value it has
> trouble finding the BSFEngineImpl class. Is this supposed to ship with
> the BSF jar or the bsh-1.3.0.jar?
>
> 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
>
****************************************************************************
>
>
>
> Doug Lochart wrote:
>
> >I am using 1.6beta (still) with bsf2.3.0, RHINO15R3 and BeanShell at
1.3.0
> >and all seems to work fine.
> >I had trouble with Beanshell 2.0.  I have seen the same error message and
it
> >was an incompatibility issue.
> >
> >I hope this helps a little
> >
> >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.
> >----- Original Message ----- 
> >From: "Clifton C. Craig" <cc...@icsaward.com>
> >To: "Ant Users List" <us...@ant.apache.org>
> >Sent: Wednesday, January 21, 2004 2:25 PM
> >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
> >>the script tag as it has good potential for what I need in my project
> >>right now but I need help. Thanks in advance.
> >>
> >>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
> >>
> >>
> >>
>
>***************************************************************************
*
> >
> >
> >>---------------------------------------------------------------------
> >>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
> >
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> 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


Re: How to use the script tag

Posted by "Clifton C. Craig" <cc...@icsaward.com>.
Wait a minute. what value do you specify for the language attribute to 
use beanshell? Is it "beanshell"? I found nothing in the Ant docs and it 
seems there should be some sort of value listing like javascript, 
beanshell, jython, etc. When I use "beanshell" as the value it has 
trouble finding the BSFEngineImpl class. Is this supposed to ship with 
the BSF jar or the bsh-1.3.0.jar?

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
****************************************************************************



Doug Lochart wrote:

>I am using 1.6beta (still) with bsf2.3.0, RHINO15R3 and BeanShell at 1.3.0
>and all seems to work fine.
>I had trouble with Beanshell 2.0.  I have seen the same error message and it
>was an incompatibility issue.
>
>I hope this helps a little
>
>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.
>----- Original Message ----- 
>From: "Clifton C. Craig" <cc...@icsaward.com>
>To: "Ant Users List" <us...@ant.apache.org>
>Sent: Wednesday, January 21, 2004 2:25 PM
>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
>>the script tag as it has good potential for what I need in my project
>>right now but I need help. Thanks in advance.
>>
>>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
>>
>>    
>>
>****************************************************************************
>  
>
>>---------------------------------------------------------------------
>>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
>
>
>
>  
>

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


Re: How to use the script tag

Posted by Doug Lochart <dl...@capecomputing.com>.
I am using 1.6beta (still) with bsf2.3.0, RHINO15R3 and BeanShell at 1.3.0
and all seems to work fine.
I had trouble with Beanshell 2.0.  I have seen the same error message and it
was an incompatibility issue.

I hope this helps a little

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.
----- Original Message ----- 
From: "Clifton C. Craig" <cc...@icsaward.com>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Wednesday, January 21, 2004 2:25 PM
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
> the script tag as it has good potential for what I need in my project
> right now but I need help. Thanks in advance.
>
> 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
>
****************************************************************************
>
>
> ---------------------------------------------------------------------
> 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