ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r446758 - in /ant/core/trunk: ./ src/main/org/apache/tools/ant/taskdefs/ src/main/org/apache/tools/ant/taskdefs/optional/ src/main/org/apache/tools/ant/taskdefs/optional/script/ src/main/org/apache/tools/ant/types/optional/ src/main/org/apa...
Date Fri, 15 Sep 2006 21:58:36 GMT
Author: peterreilly
Date: Fri Sep 15 14:58:35 2006
New Revision: 446758

URL: http://svn.apache.org/viewvc?view=rev&rev=446758
Log:
Move ScriptRunner (which depends on bsf.jar) to
an optional package

Added:
    ant/core/trunk/src/main/org/apache/tools/ant/util/optional/ScriptRunner.java
      - copied, changed from r446740, ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunner.java
Removed:
    ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunner.java
Modified:
    ant/core/trunk/build.xml
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Definer.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Script.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptFilter.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptSelector.java

Modified: ant/core/trunk/build.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/build.xml?view=diff&rev=446758&r1=446757&r2=446758
==============================================================================
--- ant/core/trunk/build.xml (original)
+++ ant/core/trunk/build.xml Fri Sep 15 14:58:35 2006
@@ -241,6 +241,7 @@
       <filename name="${optional.package}/script/**/*"/>
       <filename name="${optional.type.package}/*Script*"/>
       <filename name="${util.package}/Script*"/>
+      <filename name="${util.package}/optional/Script*"/>
     </or>
   </selector>
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Definer.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Definer.java?view=diff&rev=446758&r1=446757&r2=446758
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Definer.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Definer.java Fri Sep 15 14:58:35
2006
@@ -463,6 +463,30 @@
     }
 
     /**
+     * Antlib attribute, sets resource and uri.
+     * uri is set the antlib value and, resource is set
+     * to the antlib.xml resource in the classpath.
+     * For example antlib="antlib:org.acme.bland.cola"
+     * corresponds to uri="antlib:org.acme.bland.cola"
+     * resource="org/acme/bland/cola/antlib.xml".
+     * ASF Bugzilla Bug 31999
+     * @param antlib the value to set.
+     */
+    public void setAntlib(String antlib) {
+        if (definerSet) {
+            tooManyDefinitions();
+        }
+        if (!antlib.startsWith("antlib:")) {
+            throw new BuildException(
+                "Invalid antlib attribute - it must start with antlib:");
+        }
+        setURI(antlib);
+        this.resource = antlib.substring("antlib:".length()).replace('.','/')
+            + "/antlib.xml";
+        definerSet = true;
+    }
+
+    /**
      * Name of the definition
      * @param name the name of the definition
      */

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Script.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Script.java?view=diff&rev=446758&r1=446757&r2=446758
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Script.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Script.java Fri Sep 15
14:58:35 2006
@@ -20,7 +20,7 @@
 import java.io.File;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Task;
-import org.apache.tools.ant.util.ScriptRunner;
+import org.apache.tools.ant.util.optional.ScriptRunner;
 import org.apache.tools.ant.types.Path;
 import org.apache.tools.ant.types.Reference;
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java?view=diff&rev=446758&r1=446757&r2=446758
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java Fri
Sep 15 14:58:35 2006
@@ -36,7 +36,7 @@
 import java.io.File;
 
 import org.apache.tools.ant.util.ClasspathUtils;
-import org.apache.tools.ant.util.ScriptRunner;
+import org.apache.tools.ant.util.optional.ScriptRunner;
 
 /**
  * Define a task using a script

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java?view=diff&rev=446758&r1=446757&r2=446758
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
Fri Sep 15 14:58:35 2006
@@ -18,7 +18,7 @@
 package org.apache.tools.ant.types.optional;
 
 import org.apache.tools.ant.ProjectComponent;
-import org.apache.tools.ant.util.ScriptRunner;
+import org.apache.tools.ant.util.optional.ScriptRunner;
 
 import java.io.File;
 

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=446758&r1=446757&r2=446758
==============================================================================
--- 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 Fri Sep
15 14:58:35 2006
@@ -20,7 +20,7 @@
 import org.apache.tools.ant.filters.TokenFilter;
 import java.io.File;
 import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.util.ScriptRunner;
+import org.apache.tools.ant.util.optional.ScriptRunner;
 
 
 /**

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptSelector.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptSelector.java?view=diff&rev=446758&r1=446757&r2=446758
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptSelector.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptSelector.java Fri Sep
15 14:58:35 2006
@@ -18,7 +18,7 @@
 package org.apache.tools.ant.types.optional;
 
 import org.apache.tools.ant.types.selectors.BaseSelector;
-import org.apache.tools.ant.util.ScriptRunner;
+import org.apache.tools.ant.util.optional.ScriptRunner;
 import org.apache.tools.ant.BuildException;
 
 import java.io.File;

Copied: ant/core/trunk/src/main/org/apache/tools/ant/util/optional/ScriptRunner.java (from
r446740, ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunner.java)
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/optional/ScriptRunner.java?view=diff&rev=446758&p1=ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunner.java&r1=446740&p2=ant/core/trunk/src/main/org/apache/tools/ant/util/optional/ScriptRunner.java&r2=446758
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunner.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/optional/ScriptRunner.java Fri Sep 15
14:58:35 2006
@@ -15,7 +15,7 @@
  *  limitations under the License.
  *
  */
-package org.apache.tools.ant.util;
+package org.apache.tools.ant.util.optional;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -28,6 +28,8 @@
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.ProjectComponent;
 import org.apache.tools.ant.Project;
+
+import org.apache.tools.ant.util.FileUtils;
 
 import java.util.Map;
 import java.util.HashMap;



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


Mime
View raw message