ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rosenberg" <>
Subject Re: Problem using script task
Date Tue, 26 Dec 2000 06:26:36 GMT

When I installed Ant1.2, I installed the binary version, and so I don't
have any bootstrap files to run, etc....I manually placed the optional.jar
in my /Ant1.2/lib directory, and the ant script is finding it ok and adding
it to the classpath.....

I get the same error with a <junit> class, so I think I am definitely not
properly configured for optional tasks.

  ----- Original Message ----- 
  From: Jason Rosenberg 
  To: ; 
  Sent: Tuesday, December 26, 2000 1:02 AM
  Subject: Re: Problem using script task

  I now notice that EjbJar.class appears both in ant.jar and optional.jar
  for Ant1.2.  So, this makes me think that maybe my use of optional
  tasks, in general, is not properly configured.  I do, however, certainly
  have the optional.jar in my classpath, and it does contain Script.class.


    ----- Original Message ----- 
    From: Jason Rosenberg 
    To: ; 
    Sent: Tuesday, December 26, 2000 12:42 AM
    Subject: Problem using script task


    For some reason, I am having trouble using the script task.  I am using Ant 1.2.
    I apparently do have the correct file, which references the
    script task as being in the optional.jar, and the optional.jar I have does include
    Script.class, and optional.jar is in my classpath, since I am able to run
    other tasks contained in it, such as ejbjar.....

    Any ideas?

    I am using JDK 1.3.   It happens both on Windows NT 4.0 and on Solaris 7.

    Below is the script file I am trying to run, taken
    from one of the examples in the online doc for the script task:


    <project name="squares" default="main" basedir=".">

      <target name="setup">

        <property resource=""/>
        <echo message="the value of 'script' = '${script}'"/>

        <script language="javascript"> <![CDATA[

          for (i=1; i<=10; i++) {
            echo = squares.createTask("echo");

        ]]> </script>


      <target name="main" depends="setup" />



    Below is the output when I try to run with it:


    D:\NewWork\SourceRoot>ant -buildfile text2.xml
    Buildfile: text2.xml

    the value of 'script' = ''


    D:\NewWork\SourceRoot\text2.xml:8: Could not create task of type: script because I can't
find it in the list of task class definitions.  Com
    mon solutions are: 1 execute bin/bootstrap. 2 use taskdef to declare your task. 3 add
the task to

    Total time: 1 second


View raw message