ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan, Andersson" <Jan.Anders...@agriculture.gov.ie>
Subject Creating CallTarget in BSH to make a antcall
Date Mon, 02 Dec 2002 16:11:30 GMT
Hi!
I'm trying to do an antcall in BeanShell as an alternative to project.executeTarget("X").
This to be able to pass in parameters.
This is the way I tried to do it:

<script language="beanshell"> <![CDATA[
	xyz = project.createTask("CallTarget"); 
	xyz.setTarget("apply.patch_file"); //xyz seems to be null here...
	xyz.execute();
}
   ]]> </script>

I was thinking this should work since this works fine:
	 echo = project.createTask("echo");
       echo.setMessage("Message");

But an exception is thrown:
"file:C:/dev/IMAP_DEV/Tests/build.xml:50: com.ibm.bsf.BSFException: The applicati
on script threw an exception: java.lang.NullPointerException BSF info: <ANT> at
line: 0 column: columnNo
        at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:143)"

Does anyone know about this or might be able to point me in the right direction?
Thanks!
Jan

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