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