Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using beanshell in ANT

Status
Not open for further replies.

dpape

Programmer
May 13, 2005
1
CA
Hi all, I am trying to use <script language="beanshell"> in ANT. I've been able to get this to work if I put the bsf and bsh jars in my classpath before running the script. I'd like to be able to specify the location of the jars though in the build file, something like this:

<project name="test" default="init" basedir=".">
<path id="scripting.classpath">
<pathelement location="E:\bsf\bsf.jar"/>
<pathelement location="E:\bsf\bsh-2.0b2.jar"/>
</path>

<target name="init">
<classpath>
<pathelement path="${scripting.classpath}"/>
</classpath>

<script language="beanshell">
//blah
</script>

</target>

</project>

ANT is complaining that I can't have a classpath reference in the init task, but with just the path id reference, the beanshell jars can't be found. Is there a way I can set the classpath in the buildfile so that the <script language="beanshell"> tag can be found? Anyone have any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top