ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgl...@apache.org
Subject svn commit: r483672 - in /ant/core/trunk: build.xml src/main/org/apache/tools/ant/types/optional/ScriptFilter.java
Date Thu, 07 Dec 2006 21:24:21 GMT
Author: jglick
Date: Thu Dec  7 13:24:20 2006
New Revision: 483672

URL: http://svn.apache.org/viewvc?view=rev&rev=483672
Log:
It is now possible to build Ant without BSF and then run using JSR scripting.

Modified:
    ant/core/trunk/build.xml
    ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptFilter.java

Modified: ant/core/trunk/build.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/build.xml?view=diff&rev=483672&r1=483671&r2=483672
==============================================================================
--- ant/core/trunk/build.xml (original)
+++ ant/core/trunk/build.xml Thu Dec  7 13:24:20 2006
@@ -241,11 +241,8 @@
 
   <selector id="needs.apache-bsf">
     <or>
-      <filename name="${optional.package}/Script*"/>
-      <filename name="${optional.package}/script/**/*"/>
-      <filename name="${optional.type.package}/*Script*"/>
-      <filename name="${util.package}/Script*"/>
-      <filename name="${util.package}/optional/Script*"/>
+      <filename name="${util.package}/ScriptRunner.*"/>
+      <filename name="${util.package}/optional/ScriptRunner*"/>
     </or>
   </selector>
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptFilter.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptFilter.java?view=diff&rev=483672&r1=483671&r2=483672
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptFilter.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptFilter.java Thu Dec
 7 13:24:20 2006
@@ -15,13 +15,14 @@
  *  limitations under the License.
  *
  */
+
 package org.apache.tools.ant.types.optional;
 
 import org.apache.tools.ant.filters.TokenFilter;
 import java.io.File;
 import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.util.optional.ScriptRunner;
-
+import org.apache.tools.ant.util.ScriptRunnerBase;
+import org.apache.tools.ant.util.ScriptRunnerHelper;
 
 /**
  * Most of this is CAP (Cut And Paste) from the Script task
@@ -40,7 +41,7 @@
     /** the token used by the script */
     private String token;
 
-    private ScriptRunner runner = new ScriptRunner();
+    private ScriptRunnerHelper runner = new ScriptRunnerHelper();
 
     /**
      * Defines the language (required).
@@ -61,7 +62,6 @@
             return;
         }
         initialized = true;
-        runner.bindToComponent(this);
     }
 
     /**
@@ -93,7 +93,9 @@
     public String filter(String token) {
         init();
         setToken(token);
-        runner.executeScript("ant_filter");
+        ScriptRunnerBase srb = runner.getScriptRunner();
+        srb.bindToComponent(this);
+        srb.executeScript("ant_filter");
         return getToken();
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message