bodewig 2002/11/13 23:48:25
Modified: . WHATSNEW build.xml
docs/manual install.html tasksoverview.html
docs/manual/OptionalTasks script.html
src/main/org/apache/tools/ant/taskdefs/optional Script.java
Log:
Switching to Apache BSF
Revision Changes Path
1.318 +3 -0 jakarta-ant/WHATSNEW
Index: WHATSNEW
===================================================================
RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
retrieving revision 1.317
retrieving revision 1.318
diff -u -r1.317 -r1.318
--- WHATSNEW 12 Nov 2002 08:30:47 -0000 1.317
+++ WHATSNEW 14 Nov 2002 07:48:24 -0000 1.318
@@ -14,6 +14,9 @@
"java -jar ant-bootstrap.jar" instead if you want to run Ant without
the wrapper script (not recommended).
+* The <script> task now requires Apache BSF instead of the older IBM
+ version. See <http://jakarta.apache.org/bsf/>
+
Fixed bugs:
-----------
1.333 +2 -2 jakarta-ant/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/build.xml,v
retrieving revision 1.332
retrieving revision 1.333
diff -u -r1.332 -r1.333
--- build.xml 8 Nov 2002 10:27:39 -0000 1.332
+++ build.xml 14 Nov 2002 07:48:24 -0000 1.333
@@ -319,7 +319,7 @@
<available property="jdk1.4+" classname="java.lang.CharSequence"/>
<available property="kaffe" classname="kaffe.util.NotImplemented"/>
<available property="bsf.present"
- classname="com.ibm.bsf.BSFManager"
+ classname="org.apache.bsf.BSFManager"
classpathref="classpath"/>
<condition property="netrexx.present">
<and>
@@ -840,7 +840,7 @@
<selector refid="needs.commons.logging"/>
</jar>
- <jar destfile="${build.lib}/${optional.jars.prefix}-bsf.jar"
+ <jar destfile="${build.lib}/${optional.jars.prefix}-apache-bsf.jar"
basedir="${build.classes}"
manifest="${manifest.tmp}">
<selector refid="needs.bsf"/>
1.37 +19 -5 jakarta-ant/docs/manual/install.html
Index: install.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/install.html,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- install.html 11 Nov 2002 15:50:45 -0000 1.36
+++ install.html 14 Nov 2002 07:48:24 -0000 1.37
@@ -320,23 +320,27 @@
<tr>
<td >bsf.jar</td>
<td>script task</td>
- <td><a href="http://oss.software.ibm.com/developerworks/projects/bsf"
target="_top">
- oss.software.ibm.com/developerworks/projects/bsf</a></td>
+ <td><a href="http://jakarta.apache.org/bsf/"
target="_top">http://jakarta.apache.org/bsf/</a></td>
</tr>
<tr>
<td>netrexx.jar</td>
- <td>netrexx task</td>
+ <td>netrexx task, Rexx with the script task</td>
<td><a href="http://www2.hursley.ibm.com/netrexx" target="_top">
www2.hursley.ibm.com/netrexx</a></td>
</tr>
<tr>
<td>js.jar</td>
- <td>javascript with script task</td>
+ <td>Javascript with script task</td>
<td><a href="http://www.mozilla.org/rhino/"
target="_top">www.mozilla.org/rhino</a></td>
</tr>
<tr>
+ <td>jython.jar</td>
+ <td>Python with script task</td>
+ <td><a href="http://jython.sourceforge.net/"
target="_top">jython.sourceforge.net</a></td>
+ </tr>
+ <tr>
<td>jpython.jar</td>
- <td>python with script task</td>
+ <td>Python with script task <b>deprecated, jython is the prefered
engine</b></td>
<td><a href="http://www.jpython.org/"
target="_top">www.jpython.org</a></td>
</tr>
<tr>
@@ -348,6 +352,16 @@
<td>BeanShell JAR(s)</td>
<td>BeanShell with script task</td>
<td><a href="http://www.beanshell.org"
target="_top">www.beanshell.org</a></td>
+ </tr>
+ <tr>
+ <td>jruby.jar</td>
+ <td>Ruby with script task</td>
+ <td><a href="http://jruby.sourceforge.net/"
target="_top">jruby.sourceforge.net</a></td>
+ </tr>
+ <tr>
+ <td>judo.jar</td>
+ <td>Judoscript with script task</td>
+ <td><a href="http://www.judoscript.com/index.html"
target="_top">www.judoscript.com/index.html</a></td>
</tr>
<tr>
<td>netcomponents.jar</td>
1.17 +2 -2 jakarta-ant/docs/manual/tasksoverview.html
Index: tasksoverview.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/tasksoverview.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- tasksoverview.html 9 Jul 2002 21:05:50 -0000 1.16
+++ tasksoverview.html 14 Nov 2002 07:48:24 -0000 1.17
@@ -723,8 +723,8 @@
<tr valign="top">
<td nowrap><a href="OptionalTasks/script.html">Script</a></td>
<td><p>Executes a script in a
- <a href="http://oss.software.ibm.com/developerworks/opensource/bsf/"
- target="_top">BSF</a>-supported language.</p></td>
+ <a href="http://jakarta.apache.org/bsf/"
+ target="_top">Apache BSF</a>-supported language.</p></td>
</tr>
<tr valign="top">
1.11 +2 -6 jakarta-ant/docs/manual/OptionalTasks/script.html
Index: script.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/OptionalTasks/script.html,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- script.html 9 Jul 2002 21:05:52 -0000 1.10
+++ script.html 14 Nov 2002 07:48:25 -0000 1.11
@@ -10,7 +10,7 @@
<h2><a name="script">Script</a></h2>
<h3>Description</h3>
<p>Execute a script in a
- <a href="http://www-124.ibm.com/developerworks/projects/bsf"
target="_top">BSF</a> supported language.</p>
+ <a href="http://jakarta.apache.org/bsf" target="_top">Apache BSF</a>
supported language.</p>
<p><b>Note:</b> This task depends on external libraries not included in the
Ant distribution.
See <a href="../install.html#librarydependencies">Library Dependencies</a>
for more information.</p>
<p>All items (tasks, targets, etc) of the running project are
@@ -19,10 +19,6 @@
valid Java identifiers, that is).
The name "project" is a pre-defined reference to the Project, which can be
used instead of the project name.</p>
-<p><b>BeanShell users:</b> This task now natively supports the BeanShell
-scripting language, using language="beanshell". The BeanShell engine is
-still required.
-</p>
<p>Scripts can do almost anything a task written in Java could do.</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
@@ -34,7 +30,7 @@
<tr>
<td valign="top">language</td>
<td valign="top">The programming language the script is written in.
- Must be a supported BSF language</td>
+ Must be a supported Apache BSF language</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
1.19 +3 -13
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Script.java
Index: Script.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Script.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Script.java 25 Jul 2002 15:21:11 -0000 1.18
+++ Script.java 14 Nov 2002 07:48:25 -0000 1.19
@@ -53,13 +53,13 @@
*/
package org.apache.tools.ant.taskdefs.optional;
-import com.ibm.bsf.BSFException;
-import com.ibm.bsf.BSFManager;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Enumeration;
import java.util.Hashtable;
+import org.apache.bsf.BSFException;
+import org.apache.bsf.BSFManager;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
@@ -74,16 +74,6 @@
private String script = "";
private Hashtable beans = new Hashtable();
- // Register BeanShell ourselves, since BSF does not
- // natively support it (yet).
- // This "hack" can be removed once BSF has been
- // modified to support BeanShell or more dynamic
- // registration.
- static {
- BSFManager.registerScriptingEngine( "beanshell",
- "bsh.util.BeanShellBSFEngine", new String [] { "bsh" } );
- }
-
/**
* Add a list of named objects to the list to be exported to the script
*/
@@ -99,7 +89,7 @@
}
if (isValid) {
- beans.put(key, dictionary.get(key));
+ beans.put(key, dictionary.get(key));
}
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>