svn commit: r902592 - /jakarta/jmeter/trunk/build.xml

[email protected]
Newsgroups gmane.comp.jakarta.jmeter.devel
Message-ID <[email protected]>
Author: sebb
Date: Sun Jan 24 16:07:45 2010
New Revision: 902592

URL: http://svn.apache.org/viewvc?rev=902592&view=rev
Log:
Only download bsf-api jar if javax.script not supported by JVM

Modified:
    jakarta/jmeter/trunk/build.xml

Modified: jakarta/jmeter/trunk/build.xml
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/build.xml?rev=902592&r1=902591&r2=902592&view=diff
==============================================================================
--- jakarta/jmeter/trunk/build.xml (original)
+++ jakarta/jmeter/trunk/build.xml Sun Jan 24 16:07:45 2010
@@ -1981,6 +1981,11 @@
         <echo level="info" message="Checksum OK: ${file}"/>
     </target>
 
+    <!-- Optionally download BSF-API jar -->
+    <target name="_process_javax_script" unless="javax.script.present">
+        <process_jarfile jarname="apache-bsf-api" dest.dir="${lib.api}"/>
+    </target>
+
 	<!--
 	Generic target to process all external jars.
 	The "process_jarfile" macro resolves the properties that begin with the jarname
@@ -1989,8 +1994,9 @@
 	-->
     <target name="_process_all_jars">
         <process_jarfile jarname="apache-bsf"/>
-        <!-- TODO: only download if javax.script.ScriptEngine not in JVM classlib -->
-        <process_jarfile jarname="apache-bsf-api" dest.dir="${lib.api}"/>
+        <!-- Only download if javax.script.ScriptEngine not in JVM classlib -->
+        <available classpathref="classpath" classname="javax.script.ScriptEngine" property="javax.script.present"/>
+        <antcall target="_process_javax_script"/>
         <process_jarfile jarname="avalon-framework"/>
         <process_jarfile jarname="beanshell"/>
         <process_jarfile jarname="commons-codec"/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.