ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <n...@apache.org>
Subject Re: using antcall from javascript
Date Wed, 05 Sep 2001 07:32:02 GMT
using antcall from javascript
  From: Daryl Coutinho 
  To: 'ant-dev@jakarta.apache.org ' 
  Sent: Wednesday, September 05, 2001 12:31 AM
  Subject: using antcall from javascript


  hi, 
  well i've been trying to use the script tag to call another target, but i always get a null
pointer exception. my code looks like this:

  <project name="sample" default="test" basedir="."> 
          <target name="test"> 
                  <property file="../build.properties" /> 
                  <script language="javascript"> <![CDATA[ 
                                  antcall=sample.createTask('antcall');   
                                  antcall.init(); 
                                  antcall.setTarget('some'); 
                                  antcall.execute(); 
                  ]]> </script> 
          </target> 
          <target name="some"> 
                  <echo message="inside some" /> 
          </target> 
  </project> 

  Am i missing something here. Any help would be appreciated 

Unfortunately you don't tell us the Ant version you are using. Your example works fine for
me using Ant 1.4, so I suggtest you should try this. 

(And please read http://jakarta.apache.org/site/mail.html)

Nico




Mime
View raw message