You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@apache.org on 2006/12/04 05:51:55 UTC

svn commit: r482069 [1/2] - in /ant/core/trunk/src: main/org/apache/tools/ant/ main/org/apache/tools/ant/filters/ main/org/apache/tools/ant/taskdefs/ main/org/apache/tools/ant/taskdefs/condition/ main/org/apache/tools/ant/taskdefs/optional/extension/ m...

Author: bodewig
Date: Sun Dec  3 20:51:50 2006
New Revision: 482069

URL: http://svn.apache.org/viewvc?view=rev&rev=482069
Log:
linefeeds

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/ExitStatusException.java
    ant/core/trunk/src/main/org/apache/tools/ant/filters/StringInputStream.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Exit.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ResourceCount.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Transform.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison3.java   (contents, props changed)
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/HasMethod.java   (contents, props changed)
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJDoc.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/Constants.java   (contents, props changed)
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java   (contents, props changed)
    ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResourceIterator.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ChecksumAlgorithm.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/modifiedselector/PropertiesfileCache.java
    ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java   (contents, props changed)
    ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerCreator.java   (contents, props changed)
    ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java   (contents, props changed)
    ant/core/trunk/src/main/org/apache/tools/ant/util/facade/ImplementationSpecificArgument.java
    ant/core/trunk/src/tests/antunit/taskdefs/delete-test.xml   (contents, props changed)
    ant/core/trunk/src/tests/antunit/taskdefs/war-test.xml   (contents, props changed)
    ant/core/trunk/src/tests/antunit/taskdefs/web.xml   (contents, props changed)
    ant/core/trunk/src/tests/antunit/types/fileset-test.xml   (contents, props changed)
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/ManifestClassPathTest.java   (contents, props changed)
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/StyleTest.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/SubAntTest.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/SyncTest.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/condition/AntVersionTest.java   (contents, props changed)
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/JavahTest.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/RpmTest.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/DOMUtilTest.java   (contents, props changed)
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/SuiteMethodTest.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/resources/JavaResourceTest.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/resources/TarResourceTest.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/selectors/MockAlgorithm.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/selectors/MockCache.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/selectors/MockComparator.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/util/ReaderInputStreamTest.java   (contents, props changed)
    ant/core/trunk/src/tests/junit/org/example/tasks/antlib.xml   (contents, props changed)
    ant/core/trunk/src/tests/junit/org/example/tasks/antlib2.xml   (contents, props changed)

Modified: ant/core/trunk/src/main/org/apache/tools/ant/ExitStatusException.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/ExitStatusException.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/ExitStatusException.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/ExitStatusException.java Sun Dec  3 20:51:50 2006
@@ -64,4 +64,4 @@
     public int getStatus() {
         return status;
     }
-}
\ No newline at end of file
+}

Modified: ant/core/trunk/src/main/org/apache/tools/ant/filters/StringInputStream.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/filters/StringInputStream.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/filters/StringInputStream.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/filters/StringInputStream.java Sun Dec  3 20:51:50 2006
@@ -46,4 +46,4 @@
         super(new StringReader(source), encoding);
     }
 
-}
\ No newline at end of file
+}

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Exit.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Exit.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Exit.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Exit.java Sun Dec  3 20:51:50 2006
@@ -214,4 +214,4 @@
         return (nestedCondition != null);
     }
 
-}
\ No newline at end of file
+}

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java Sun Dec  3 20:51:50 2006
@@ -230,4 +230,4 @@
             throw new BuildException("expected a java resource as source");
         }
     }
-}
\ No newline at end of file
+}

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ResourceCount.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ResourceCount.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ResourceCount.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ResourceCount.java Sun Dec  3 20:51:50 2006
@@ -121,4 +121,4 @@
         property = p;
     }
 
-}
\ No newline at end of file
+}

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Transform.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Transform.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Transform.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Transform.java Sun Dec  3 20:51:50 2006
@@ -27,4 +27,4 @@
  * @ant.task ignore="true"
  */
 public class Transform extends ExecuteOn {
-}
\ No newline at end of file
+}

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison3.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison3.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison3.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison3.java Sun Dec  3 20:51:50 2006
@@ -1,35 +1,35 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.tools.ant.taskdefs;
-
-import org.apache.tools.ant.types.Resource;
-
-/**
- * Extends Proxy interface for XSLT processors.
- *
- * @see XSLTProcess
- * @since Ant 1.7
- */
-public interface XSLTLiaison3 extends XSLTLiaison2 {
-    /**
-     * sets the stylesheet to use as a resource
-     * @param stylesheet the stylesheet to use as a resource
-     * @throws Exception if the stylesheet cannot be loaded
-     */
-    void setStylesheet(Resource stylesheet) throws Exception;
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.tools.ant.taskdefs;
+
+import org.apache.tools.ant.types.Resource;
+
+/**
+ * Extends Proxy interface for XSLT processors.
+ *
+ * @see XSLTProcess
+ * @since Ant 1.7
+ */
+public interface XSLTLiaison3 extends XSLTLiaison2 {
+    /**
+     * sets the stylesheet to use as a resource
+     * @param stylesheet the stylesheet to use as a resource
+     * @throws Exception if the stylesheet cannot be loaded
+     */
+    void setStylesheet(Resource stylesheet) throws Exception;
+}

Propchange: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison3.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/HasMethod.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/HasMethod.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/HasMethod.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/HasMethod.java Sun Dec  3 20:51:50 2006
@@ -1,183 +1,183 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.tools.ant.taskdefs.condition;
-
-import org.apache.tools.ant.types.Path;
-import org.apache.tools.ant.types.Reference;
-import org.apache.tools.ant.AntClassLoader;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.ProjectComponent;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.Field;
-
-/**
- * test for a method
- */
-public class HasMethod extends ProjectComponent implements Condition {
-    private String classname;
-    private String method;
-    private String field;
-    private Path classpath;
-    private AntClassLoader loader;
-    private boolean ignoreSystemClasses = false;
-
-
-    /**
-     * Set the classpath to be used when searching for classes and resources.
-     *
-     * @param classpath an Ant Path object containing the search path.
-     */
-    public void setClasspath(Path classpath) {
-        createClasspath().append(classpath);
-    }
-
-    /**
-     * Classpath to be used when searching for classes and resources.
-     *
-     * @return an empty Path instance to be configured by Ant.
-     */
-    public Path createClasspath() {
-        if (this.classpath == null) {
-            this.classpath = new Path(getProject());
-        }
-        return this.classpath.createPath();
-    }
-
-    /**
-     * Set the classpath by reference.
-     *
-     * @param r a Reference to a Path instance to be used as the classpath
-     *          value.
-     */
-    public void setClasspathRef(Reference r) {
-        createClasspath().setRefid(r);
-    }
-
-    /**
-     * Set the classname attribute.
-     * @param classname the name of the class to check.
-     */
-    public void setClassname(String classname) {
-        this.classname = classname;
-    }
-
-    /**
-     * Set the name of the method.
-     * @param method the name of the method to check.
-     */
-    public void setMethod(String method) {
-        this.method = method;
-    }
-
-    /**
-     * Set the name of the field.
-     * @param field the name of the field to check.
-     */
-    public void setField(String field) {
-        this.field = field;
-    }
-
-    /**
-     * Set whether to ignore system classes when looking for the class.
-     * @param ignoreSystemClasses a <code>boolean</code> value.
-     */
-    public void setIgnoreSystemClasses(boolean ignoreSystemClasses) {
-        this.ignoreSystemClasses = ignoreSystemClasses;
-    }
-
-    /**
-     * Check if a given class can be loaded.
-     */
-    private Class loadClass(String classname) {
-        try {
-            if (ignoreSystemClasses) {
-                loader = getProject().createClassLoader(classpath);
-                loader.setParentFirst(false);
-                loader.addJavaLibraries();
-                if (loader != null) {
-                    try {
-                        return loader.findClass(classname);
-                    } catch (SecurityException se) {
-                        // class found but restricted name; this is
-                        // actually the case we're looking for in JDK 1.3+,
-                        // so catch the exception and return
-                        return null;
-                    }
-                } else {
-                    return null;
-                }
-            } else if (loader != null) {
-                return loader.loadClass(classname);
-            } else {
-                ClassLoader l = this.getClass().getClassLoader();
-                // Can return null to represent the bootstrap class loader.
-                // see API docs of Class.getClassLoader.
-                if (l != null) {
-                    return Class.forName(classname, true, l);
-                } else {
-                    return Class.forName(classname);
-                }
-            }
-        } catch (ClassNotFoundException e) {
-            throw new BuildException("class \"" + classname + "\" was not found");
-        } catch (NoClassDefFoundError e) {
-            throw new BuildException("Could not load dependent class \"" + e.getMessage()
-                    + "\" for class \"" + classname + "\"");
-        }
-    }
-
-
-    /** {@inheritDoc}. */
-    public boolean eval() throws BuildException {
-        if (classname == null) {
-            throw new BuildException("No classname defined");
-        }
-        Class clazz = loadClass(classname);
-        if (method != null) {
-            return isMethodFound(clazz);
-        }
-        if (field != null) {
-            return isFieldFound(clazz);
-        }
-        throw new BuildException("Neither method nor field defined");
-    }
-
-    private boolean isFieldFound(Class clazz) {
-        Field[] fields = clazz.getDeclaredFields();
-        for (int i = 0; i < fields.length; i++) {
-            Field fieldEntry = fields[i];
-            if (fieldEntry.getName().equals(field)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private boolean isMethodFound(Class clazz) {
-        Method[] methods = clazz.getDeclaredMethods();
-        for (int i = 0; i < methods.length; i++) {
-            Method methodEntry = methods[i];
-            if (methodEntry.getName().equals(method)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.tools.ant.taskdefs.condition;
+
+import org.apache.tools.ant.types.Path;
+import org.apache.tools.ant.types.Reference;
+import org.apache.tools.ant.AntClassLoader;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.ProjectComponent;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Field;
+
+/**
+ * test for a method
+ */
+public class HasMethod extends ProjectComponent implements Condition {
+    private String classname;
+    private String method;
+    private String field;
+    private Path classpath;
+    private AntClassLoader loader;
+    private boolean ignoreSystemClasses = false;
+
+
+    /**
+     * Set the classpath to be used when searching for classes and resources.
+     *
+     * @param classpath an Ant Path object containing the search path.
+     */
+    public void setClasspath(Path classpath) {
+        createClasspath().append(classpath);
+    }
+
+    /**
+     * Classpath to be used when searching for classes and resources.
+     *
+     * @return an empty Path instance to be configured by Ant.
+     */
+    public Path createClasspath() {
+        if (this.classpath == null) {
+            this.classpath = new Path(getProject());
+        }
+        return this.classpath.createPath();
+    }
+
+    /**
+     * Set the classpath by reference.
+     *
+     * @param r a Reference to a Path instance to be used as the classpath
+     *          value.
+     */
+    public void setClasspathRef(Reference r) {
+        createClasspath().setRefid(r);
+    }
+
+    /**
+     * Set the classname attribute.
+     * @param classname the name of the class to check.
+     */
+    public void setClassname(String classname) {
+        this.classname = classname;
+    }
+
+    /**
+     * Set the name of the method.
+     * @param method the name of the method to check.
+     */
+    public void setMethod(String method) {
+        this.method = method;
+    }
+
+    /**
+     * Set the name of the field.
+     * @param field the name of the field to check.
+     */
+    public void setField(String field) {
+        this.field = field;
+    }
+
+    /**
+     * Set whether to ignore system classes when looking for the class.
+     * @param ignoreSystemClasses a <code>boolean</code> value.
+     */
+    public void setIgnoreSystemClasses(boolean ignoreSystemClasses) {
+        this.ignoreSystemClasses = ignoreSystemClasses;
+    }
+
+    /**
+     * Check if a given class can be loaded.
+     */
+    private Class loadClass(String classname) {
+        try {
+            if (ignoreSystemClasses) {
+                loader = getProject().createClassLoader(classpath);
+                loader.setParentFirst(false);
+                loader.addJavaLibraries();
+                if (loader != null) {
+                    try {
+                        return loader.findClass(classname);
+                    } catch (SecurityException se) {
+                        // class found but restricted name; this is
+                        // actually the case we're looking for in JDK 1.3+,
+                        // so catch the exception and return
+                        return null;
+                    }
+                } else {
+                    return null;
+                }
+            } else if (loader != null) {
+                return loader.loadClass(classname);
+            } else {
+                ClassLoader l = this.getClass().getClassLoader();
+                // Can return null to represent the bootstrap class loader.
+                // see API docs of Class.getClassLoader.
+                if (l != null) {
+                    return Class.forName(classname, true, l);
+                } else {
+                    return Class.forName(classname);
+                }
+            }
+        } catch (ClassNotFoundException e) {
+            throw new BuildException("class \"" + classname + "\" was not found");
+        } catch (NoClassDefFoundError e) {
+            throw new BuildException("Could not load dependent class \"" + e.getMessage()
+                    + "\" for class \"" + classname + "\"");
+        }
+    }
+
+
+    /** {@inheritDoc}. */
+    public boolean eval() throws BuildException {
+        if (classname == null) {
+            throw new BuildException("No classname defined");
+        }
+        Class clazz = loadClass(classname);
+        if (method != null) {
+            return isMethodFound(clazz);
+        }
+        if (field != null) {
+            return isFieldFound(clazz);
+        }
+        throw new BuildException("Neither method nor field defined");
+    }
+
+    private boolean isFieldFound(Class clazz) {
+        Field[] fields = clazz.getDeclaredFields();
+        for (int i = 0; i < fields.length; i++) {
+            Field fieldEntry = fields[i];
+            if (fieldEntry.getName().equals(field)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean isMethodFound(Class clazz) {
+        Method[] methods = clazz.getDeclaredMethods();
+        for (int i = 0; i < methods.length; i++) {
+            Method methodEntry = methods[i];
+            if (methodEntry.getName().equals(method)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+}

Propchange: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/HasMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java Sun Dec  3 20:51:50 2006
@@ -311,4 +311,4 @@
 
         return results;
     }
-}
\ No newline at end of file
+}

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJDoc.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJDoc.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJDoc.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJDoc.java Sun Dec  3 20:51:50 2006
@@ -212,4 +212,4 @@
         return (getProject().getBaseDir() + "/" + optionalOutputFile)
             .replace('\\', '/');
     }
-}
\ No newline at end of file
+}

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java Sun Dec  3 20:51:50 2006
@@ -402,4 +402,4 @@
 
         return root;
     }
-}
\ No newline at end of file
+}

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/Constants.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/Constants.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/Constants.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/Constants.java Sun Dec  3 20:51:50 2006
@@ -1,38 +1,38 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-
-package org.apache.tools.ant.taskdefs.optional.junit;
-
-/**
- * Constants, like filenames shared between various classes in this package.
- */
-public class Constants {
-
-    static final String HALT_ON_ERROR = "haltOnError=";
-    static final String HALT_ON_FAILURE = "haltOnFailure=";
-    static final String FILTERTRACE = "filtertrace=";
-    static final String CRASHFILE = "crashfile=";
-    static final String BEFORE_FIRST_TEST = "BeforeFirstTest";
-    static final String PROPSFILE = "propsfile=";
-    static final String SHOWOUTPUT = "showoutput=";
-    static final String OUTPUT_TO_FORMATTERS = "outputtoformatters=";
-    static final String FORMATTER = "formatter=";
-    static final String LOGTESTLISTENEREVENTS = "logtestlistenerevents=";
-    static final String TESTSFILE = "testsfile=";
-    static final String TERMINATED_SUCCESSFULLY = "terminated successfully";
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.tools.ant.taskdefs.optional.junit;
+
+/**
+ * Constants, like filenames shared between various classes in this package.
+ */
+public class Constants {
+
+    static final String HALT_ON_ERROR = "haltOnError=";
+    static final String HALT_ON_FAILURE = "haltOnFailure=";
+    static final String FILTERTRACE = "filtertrace=";
+    static final String CRASHFILE = "crashfile=";
+    static final String BEFORE_FIRST_TEST = "BeforeFirstTest";
+    static final String PROPSFILE = "propsfile=";
+    static final String SHOWOUTPUT = "showoutput=";
+    static final String OUTPUT_TO_FORMATTERS = "outputtoformatters=";
+    static final String FORMATTER = "formatter=";
+    static final String LOGTESTLISTENEREVENTS = "logtestlistenerevents=";
+    static final String TESTSFILE = "testsfile=";
+    static final String TERMINATED_SUCCESSFULLY = "terminated successfully";
+}

Propchange: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/Constants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java Sun Dec  3 20:51:50 2006
@@ -1,52 +1,52 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.tools.ant.taskdefs.rmic;
-
-import org.apache.tools.ant.types.Commandline;
-
-/**
- * Run rmic in a new process with -Xnew set.
- * This switches rmic to use a new compiler, one that doesnt work in-process
- * on ant on java1.6.
- * see: <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=38732">
- * http://issues.apache.org/bugzilla/show_bug.cgi?id=38732</a>
- */
-public class XNewRmic extends ForkingSunRmic {
-
-    /**
-     * the name of this adapter for users to select
-     */
-    public static final String COMPILER_NAME = "xnew";
-
-    /** No-arg constructor. */
-    public XNewRmic() {
-    }
-
-    /**
-     * Create a normal command line, then with -Xnew at the front
-     * @return a command line that hands off to thw
-     */
-    protected Commandline setupRmicCommand() {
-        String[] options = new String[] {
-                "-Xnew"
-        };
-        Commandline commandline = super.setupRmicCommand(options);
-        return commandline;
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.tools.ant.taskdefs.rmic;
+
+import org.apache.tools.ant.types.Commandline;
+
+/**
+ * Run rmic in a new process with -Xnew set.
+ * This switches rmic to use a new compiler, one that doesnt work in-process
+ * on ant on java1.6.
+ * see: <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=38732">
+ * http://issues.apache.org/bugzilla/show_bug.cgi?id=38732</a>
+ */
+public class XNewRmic extends ForkingSunRmic {
+
+    /**
+     * the name of this adapter for users to select
+     */
+    public static final String COMPILER_NAME = "xnew";
+
+    /** No-arg constructor. */
+    public XNewRmic() {
+    }
+
+    /**
+     * Create a normal command line, then with -Xnew at the front
+     * @return a command line that hands off to thw
+     */
+    protected Commandline setupRmicCommand() {
+        String[] options = new String[] {
+                "-Xnew"
+        };
+        Commandline commandline = super.setupRmicCommand(options);
+        return commandline;
+    }
+
+}

Propchange: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResourceIterator.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResourceIterator.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResourceIterator.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResourceIterator.java Sun Dec  3 20:51:50 2006
@@ -104,4 +104,4 @@
         return new FileResource(basedir, files[pos++]);
     }
 
-}
\ No newline at end of file
+}

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ChecksumAlgorithm.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ChecksumAlgorithm.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ChecksumAlgorithm.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ChecksumAlgorithm.java Sun Dec  3 20:51:50 2006
@@ -146,4 +146,4 @@
         buf.append(">");
         return buf.toString();
     }
-}
\ No newline at end of file
+}

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java Sun Dec  3 20:51:50 2006
@@ -199,4 +199,4 @@
         buf.append(">");
         return buf.toString();
     }
-}
\ No newline at end of file
+}

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/modifiedselector/PropertiesfileCache.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/modifiedselector/PropertiesfileCache.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/modifiedselector/PropertiesfileCache.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/modifiedselector/PropertiesfileCache.java Sun Dec  3 20:51:50 2006
@@ -233,4 +233,4 @@
         buf.append(">");
         return buf.toString();
     }
-}
\ No newline at end of file
+}

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java Sun Dec  3 20:51:50 2006
@@ -1,306 +1,306 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.tools.ant.util;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.ProjectComponent;
-import org.apache.tools.ant.Project;
-
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Iterator;
-
-/**
- * This is a common abstract base case for script runners.
- * These classes need to implement executeScript, evalulateScript
- * and supportsLanguage.
- */
-public abstract class ScriptRunnerBase {
-    /** Whether to keep the engine between calls to execute/eval */
-    private boolean keepEngine = false;
-
-    /** Script language */
-    private String language;
-
-    /** Script content */
-    private String script = "";
-
-    /** Project this runner is used in */
-    private Project project;
-
-    /** Classloader to be used when running the script. */
-    private ClassLoader scriptLoader;
-
-    /** Beans to be provided to the script */
-    private Map beans = new HashMap();
-
-    /**
-     * Add a list of named objects to the list to be exported to the script
-     *
-     * @param dictionary a map of objects to be placed into the script context
-     *        indexed by String names.
-     */
-    public void addBeans(Map dictionary) {
-        for (Iterator i = dictionary.keySet().iterator(); i.hasNext();) {
-            String key = (String) i.next();
-            try {
-                Object val = dictionary.get(key);
-                addBean(key, val);
-            } catch (BuildException ex) {
-                // The key is in the dictionary but cannot be retrieved
-                // This is usually due references that refer to tasks
-                // that have not been taskdefed in the current run.
-                // Ignore
-            }
-        }
-    }
-
-    /**
-     * Add a single object into the script context.
-     *
-     * @param key the name in the context this object is to stored under.
-     * @param bean the object to be stored in the script context.
-     */
-    public void addBean(String key, Object bean) {
-        boolean isValid = key.length() > 0
-            && Character.isJavaIdentifierStart(key.charAt(0));
-
-        for (int i = 1; isValid && i < key.length(); i++) {
-            isValid = Character.isJavaIdentifierPart(key.charAt(i));
-        }
-
-        if (isValid) {
-            beans.put(key, bean);
-        }
-    }
-
-    /**
-     * Get the beans used for the script.
-     * @return the map of beans.
-     */
-    protected Map getBeans() {
-        return beans;
-    }
-
-    /**
-     * Do the work.
-     * @param execName the name that will be passed to BSF for this script
-     *        execution.
-     */
-    public abstract void executeScript(String execName);
-
-    /**
-     * Evalulate the script.
-     * @param execName the name that will be passed to BSF for this script
-     *        execution.
-     * @return the result of evalulating the script.
-     */
-    public abstract Object evalulateScript(String execName);
-
-    /**
-     * Check if a script engine can be created for
-     * this language.
-     * @return true if a script engine can be created, false
-     *              otherwise.
-     */
-    public abstract boolean supportsLanguage();
-
-    /**
-     * Get the name of the manager prefix used for this
-     * scriptrunner.
-     * @return the prefix string.
-     */
-    public abstract String getManagerName();
-
-    /**
-     * Defines the language (required).
-     * @param language the scripting language name for the script.
-     */
-    public void setLanguage(String language) {
-        this.language = language;
-    }
-
-    /**
-     * Get the script language
-     * @return the script language
-     */
-    public String getLanguage() {
-        return language;
-    }
-
-    /**
-     * Set the script classloader.
-     * @param classLoader the classloader to use.
-     */
-    public void setScriptClassLoader(ClassLoader classLoader) {
-        this.scriptLoader = classLoader;
-    }
-
-    /**
-     * Get the classloader used to load the script engine.
-     * @return the classloader.
-     */
-    protected ClassLoader getScriptClassLoader() {
-        return scriptLoader;
-    }
-
-    /**
-     * Whether to keep the script engine between calls.
-     * @param keepEngine if true, keep the engine.
-     */
-    public void setKeepEngine(boolean keepEngine) {
-        this.keepEngine = keepEngine;
-    }
-
-    /**
-     * Get the keep engine attribute.
-     * @return the attribute.
-     */
-    public boolean getKeepEngine() {
-        return keepEngine;
-    }
-
-    /**
-     * Load the script from an external file; optional.
-     * @param file the file containing the script source.
-     */
-    public void setSrc(File file) {
-        if (!file.exists()) {
-            throw new BuildException("file " + file.getPath() + " not found.");
-        }
-        BufferedReader in = null;
-        try {
-            in = new BufferedReader(new FileReader(file));
-            script += FileUtils.readFully(in);
-        } catch (IOException ex) {
-            throw new BuildException(ex);
-        } finally {
-            FileUtils.close(in);
-        }
-    }
-
-    /**
-     * Set the script text.
-     *
-     * @param text a component of the script text to be added.
-     */
-    public void addText(String text) {
-        this.script += text;
-    }
-
-    /**
-     * Get the current script text content.
-     * @return the script text.
-     */
-    public String getScript() {
-        return script;
-    }
-
-    /**
-     * Clear the current script text content.
-     */
-    public void clearScript() {
-        this.script = "";
-    }
-
-    /**
-     * Set the project for this runner.
-     * @param project the project.
-     */
-    public void setProject(Project project) {
-        this.project = project;
-    }
-
-    /**
-     * Get the project for this runner.
-     * @return the project.
-     */
-    public Project getProject() {
-        return project;
-    }
-
-    /**
-     * Bind the runner to a project component.
-     * Properties, targets and references are all added as beans;
-     * project is bound to project, and self to the component.
-     * @param component to become <code>self</code>
-     */
-    public void bindToComponent(ProjectComponent component) {
-        project = component.getProject();
-        addBeans(project.getProperties());
-        addBeans(project.getUserProperties());
-        addBeans(project.getTargets());
-        addBeans(project.getReferences());
-        addBean("project", project);
-        addBean("self", component);
-    }
-
-    /**
-     * Bind the runner to a project component.
-     * The project and self are the only beans set.
-     * @param component to become <code>self</code>
-     */
-    public void bindToComponentMinimum(ProjectComponent component) {
-        project = component.getProject();
-        addBean("project", project);
-        addBean("self", component);
-    }
-
-    /**
-     * Check if the language attribute is set.
-     * @throws BuildException if it is not.
-     */
-    protected void checkLanguage() {
-        if (language == null) {
-            throw new BuildException(
-                "script language must be specified");
-        }
-    }
-
-    /**
-     * Replace the current context classloader with the
-     * script context classloader.
-     * @return the current context classloader.
-     */
-    protected ClassLoader replaceContextLoader() {
-        ClassLoader origContextClassLoader =
-            Thread.currentThread().getContextClassLoader();
-        if (getScriptClassLoader() == null) {
-            setScriptClassLoader(getClass().getClassLoader());
-        }
-        Thread.currentThread().setContextClassLoader(getScriptClassLoader());
-        return origContextClassLoader;
-    }
-
-    /**
-     * Restore the context loader with the original context classloader.
-     *
-     * script context loader.
-     * @param origLoader the original context classloader.
-     */
-    protected void restoreContextLoader(ClassLoader origLoader) {
-        Thread.currentThread().setContextClassLoader(
-                 origLoader);
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.tools.ant.util;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.ProjectComponent;
+import org.apache.tools.ant.Project;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Iterator;
+
+/**
+ * This is a common abstract base case for script runners.
+ * These classes need to implement executeScript, evalulateScript
+ * and supportsLanguage.
+ */
+public abstract class ScriptRunnerBase {
+    /** Whether to keep the engine between calls to execute/eval */
+    private boolean keepEngine = false;
+
+    /** Script language */
+    private String language;
+
+    /** Script content */
+    private String script = "";
+
+    /** Project this runner is used in */
+    private Project project;
+
+    /** Classloader to be used when running the script. */
+    private ClassLoader scriptLoader;
+
+    /** Beans to be provided to the script */
+    private Map beans = new HashMap();
+
+    /**
+     * Add a list of named objects to the list to be exported to the script
+     *
+     * @param dictionary a map of objects to be placed into the script context
+     *        indexed by String names.
+     */
+    public void addBeans(Map dictionary) {
+        for (Iterator i = dictionary.keySet().iterator(); i.hasNext();) {
+            String key = (String) i.next();
+            try {
+                Object val = dictionary.get(key);
+                addBean(key, val);
+            } catch (BuildException ex) {
+                // The key is in the dictionary but cannot be retrieved
+                // This is usually due references that refer to tasks
+                // that have not been taskdefed in the current run.
+                // Ignore
+            }
+        }
+    }
+
+    /**
+     * Add a single object into the script context.
+     *
+     * @param key the name in the context this object is to stored under.
+     * @param bean the object to be stored in the script context.
+     */
+    public void addBean(String key, Object bean) {
+        boolean isValid = key.length() > 0
+            && Character.isJavaIdentifierStart(key.charAt(0));
+
+        for (int i = 1; isValid && i < key.length(); i++) {
+            isValid = Character.isJavaIdentifierPart(key.charAt(i));
+        }
+
+        if (isValid) {
+            beans.put(key, bean);
+        }
+    }
+
+    /**
+     * Get the beans used for the script.
+     * @return the map of beans.
+     */
+    protected Map getBeans() {
+        return beans;
+    }
+
+    /**
+     * Do the work.
+     * @param execName the name that will be passed to BSF for this script
+     *        execution.
+     */
+    public abstract void executeScript(String execName);
+
+    /**
+     * Evalulate the script.
+     * @param execName the name that will be passed to BSF for this script
+     *        execution.
+     * @return the result of evalulating the script.
+     */
+    public abstract Object evalulateScript(String execName);
+
+    /**
+     * Check if a script engine can be created for
+     * this language.
+     * @return true if a script engine can be created, false
+     *              otherwise.
+     */
+    public abstract boolean supportsLanguage();
+
+    /**
+     * Get the name of the manager prefix used for this
+     * scriptrunner.
+     * @return the prefix string.
+     */
+    public abstract String getManagerName();
+
+    /**
+     * Defines the language (required).
+     * @param language the scripting language name for the script.
+     */
+    public void setLanguage(String language) {
+        this.language = language;
+    }
+
+    /**
+     * Get the script language
+     * @return the script language
+     */
+    public String getLanguage() {
+        return language;
+    }
+
+    /**
+     * Set the script classloader.
+     * @param classLoader the classloader to use.
+     */
+    public void setScriptClassLoader(ClassLoader classLoader) {
+        this.scriptLoader = classLoader;
+    }
+
+    /**
+     * Get the classloader used to load the script engine.
+     * @return the classloader.
+     */
+    protected ClassLoader getScriptClassLoader() {
+        return scriptLoader;
+    }
+
+    /**
+     * Whether to keep the script engine between calls.
+     * @param keepEngine if true, keep the engine.
+     */
+    public void setKeepEngine(boolean keepEngine) {
+        this.keepEngine = keepEngine;
+    }
+
+    /**
+     * Get the keep engine attribute.
+     * @return the attribute.
+     */
+    public boolean getKeepEngine() {
+        return keepEngine;
+    }
+
+    /**
+     * Load the script from an external file; optional.
+     * @param file the file containing the script source.
+     */
+    public void setSrc(File file) {
+        if (!file.exists()) {
+            throw new BuildException("file " + file.getPath() + " not found.");
+        }
+        BufferedReader in = null;
+        try {
+            in = new BufferedReader(new FileReader(file));
+            script += FileUtils.readFully(in);
+        } catch (IOException ex) {
+            throw new BuildException(ex);
+        } finally {
+            FileUtils.close(in);
+        }
+    }
+
+    /**
+     * Set the script text.
+     *
+     * @param text a component of the script text to be added.
+     */
+    public void addText(String text) {
+        this.script += text;
+    }
+
+    /**
+     * Get the current script text content.
+     * @return the script text.
+     */
+    public String getScript() {
+        return script;
+    }
+
+    /**
+     * Clear the current script text content.
+     */
+    public void clearScript() {
+        this.script = "";
+    }
+
+    /**
+     * Set the project for this runner.
+     * @param project the project.
+     */
+    public void setProject(Project project) {
+        this.project = project;
+    }
+
+    /**
+     * Get the project for this runner.
+     * @return the project.
+     */
+    public Project getProject() {
+        return project;
+    }
+
+    /**
+     * Bind the runner to a project component.
+     * Properties, targets and references are all added as beans;
+     * project is bound to project, and self to the component.
+     * @param component to become <code>self</code>
+     */
+    public void bindToComponent(ProjectComponent component) {
+        project = component.getProject();
+        addBeans(project.getProperties());
+        addBeans(project.getUserProperties());
+        addBeans(project.getTargets());
+        addBeans(project.getReferences());
+        addBean("project", project);
+        addBean("self", component);
+    }
+
+    /**
+     * Bind the runner to a project component.
+     * The project and self are the only beans set.
+     * @param component to become <code>self</code>
+     */
+    public void bindToComponentMinimum(ProjectComponent component) {
+        project = component.getProject();
+        addBean("project", project);
+        addBean("self", component);
+    }
+
+    /**
+     * Check if the language attribute is set.
+     * @throws BuildException if it is not.
+     */
+    protected void checkLanguage() {
+        if (language == null) {
+            throw new BuildException(
+                "script language must be specified");
+        }
+    }
+
+    /**
+     * Replace the current context classloader with the
+     * script context classloader.
+     * @return the current context classloader.
+     */
+    protected ClassLoader replaceContextLoader() {
+        ClassLoader origContextClassLoader =
+            Thread.currentThread().getContextClassLoader();
+        if (getScriptClassLoader() == null) {
+            setScriptClassLoader(getClass().getClassLoader());
+        }
+        Thread.currentThread().setContextClassLoader(getScriptClassLoader());
+        return origContextClassLoader;
+    }
+
+    /**
+     * Restore the context loader with the original context classloader.
+     *
+     * script context loader.
+     * @param origLoader the original context classloader.
+     */
+    protected void restoreContextLoader(ClassLoader origLoader) {
+        Thread.currentThread().setContextClassLoader(
+                 origLoader);
+    }
+
+}

Propchange: ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerCreator.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerCreator.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerCreator.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerCreator.java Sun Dec  3 20:51:50 2006
@@ -1,139 +1,139 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.tools.ant.util;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-
-/**
- * This is a helper class used by ScriptRunnerHelper to
- * create a ScriptRunner based on a classloader and
- * on a language.
- */
-public class ScriptRunnerCreator {
-    private static final String AUTO = "auto";
-    private static final String OATAU = "org.apache.tools.ant.util";
-    private static final String UTIL_OPT = OATAU + ".optional";
-
-    private static final String BSF = "bsf";
-    private static final String BSF_PACK = "org.apache.bsf";
-    private static final String BSF_MANAGER = BSF_PACK + ".BSFManager";
-    private static final String BSF_RUNNER = UTIL_OPT + ".ScriptRunner";
-
-    private static final String JAVAX = "javax";
-    private static final String JAVAX_MANAGER = "javax.script.ScriptEngineManager";
-    private static final String JAVAX_RUNNER = UTIL_OPT + ".JavaxScriptRunner";
-
-    private Project     project;
-    private String      manager;
-    private String      language;
-    private ClassLoader scriptLoader = null;
-
-    /**
-     * Constructor for creator.
-     * @param project the current project.
-     */
-    public ScriptRunnerCreator(Project project) {
-        this.project = project;
-    }
-
-    /**
-     * Create a ScriptRunner.
-     * @param manager      the script manager ("auto" | "bsf" | "javax")
-     * @param language     the language.
-     * @param classLoader  the classloader to use
-     * @return the created script runner.
-     * @throws BuildException if unable to create the ScriptRunner.
-     */
-    public ScriptRunnerBase createRunner(
-        String manager, String language, ClassLoader classLoader) {
-        this.manager      = manager;
-        this.language     = language;
-        this.scriptLoader = classLoader;
-
-        if (language == null) {
-            throw new BuildException("script language must be specified");
-        }
-        if (!manager.equals(AUTO) && !manager.equals(JAVAX) && !manager.equals(BSF)) {
-                throw new BuildException(
-                    "Unsupported language prefix " + manager);
-        }
-
-        // Check for bsf first then javax
-        // This version does not check if the scriptManager
-        // supports the language.
-
-        ScriptRunnerBase ret = null;
-        ret = createRunner(BSF, BSF_MANAGER, BSF_RUNNER);
-        if (ret == null) {
-            ret = createRunner(JAVAX, JAVAX_MANAGER, JAVAX_RUNNER);
-        }
-        if (ret != null) {
-            return ret;
-        }
-        if (JAVAX.equals(manager)) {
-            throw new BuildException(
-                "Unable to load the script engine manager "
-                + "(" + JAVAX_MANAGER + ")");
-        } else if (BSF.equals(manager)) {
-            throw new BuildException(
-                "Unable to load the BSF script engine manager "
-                + "(" + BSF_MANAGER + ")");
-        } else {
-            throw new BuildException(
-                "Unable to load a script engine manager "
-                + "(" + BSF_MANAGER + " or " + JAVAX_MANAGER + ")");
-        }
-    }
-
-    /**
-     * Create a script runner if the scriptManager matches the passed
-     * in manager.
-     * This checks if the script manager exists in the scriptLoader
-     * classloader and if so it creates and returns the script runner.
-     * @param checkManager check if the manager matchs this value.
-     * @param mangagerClass the name of the script manager class.
-     * @param runnerClass   the name of ant's script runner for this manager.
-     * @return the script runner class.
-     * @throws BuildException if there is a problem creating the runner class.
-     */
-    private ScriptRunnerBase createRunner(
-        String checkManager, String managerClass, String runnerClass) {
-        ScriptRunnerBase runner = null;
-        if (!manager.equals(AUTO) && !manager.equals(checkManager)) {
-            return null;
-        }
-        if (scriptLoader.getResource(
-                LoaderUtils.classNameToResource(managerClass)) == null) {
-            return null;
-        }
-        try {
-            runner = (ScriptRunnerBase) Class.forName(
-                runnerClass, true, scriptLoader).newInstance();
-            runner.setProject(project);
-            return runner;
-        } catch (Exception ex) {
-            ReflectUtil.throwBuildException(ex);
-            // NotReached
-        }
-
-        runner.setLanguage(language);
-        runner.setScriptClassLoader(scriptLoader);
-        return runner;
-    }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.tools.ant.util;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+
+/**
+ * This is a helper class used by ScriptRunnerHelper to
+ * create a ScriptRunner based on a classloader and
+ * on a language.
+ */
+public class ScriptRunnerCreator {
+    private static final String AUTO = "auto";
+    private static final String OATAU = "org.apache.tools.ant.util";
+    private static final String UTIL_OPT = OATAU + ".optional";
+
+    private static final String BSF = "bsf";
+    private static final String BSF_PACK = "org.apache.bsf";
+    private static final String BSF_MANAGER = BSF_PACK + ".BSFManager";
+    private static final String BSF_RUNNER = UTIL_OPT + ".ScriptRunner";
+
+    private static final String JAVAX = "javax";
+    private static final String JAVAX_MANAGER = "javax.script.ScriptEngineManager";
+    private static final String JAVAX_RUNNER = UTIL_OPT + ".JavaxScriptRunner";
+
+    private Project     project;
+    private String      manager;
+    private String      language;
+    private ClassLoader scriptLoader = null;
+
+    /**
+     * Constructor for creator.
+     * @param project the current project.
+     */
+    public ScriptRunnerCreator(Project project) {
+        this.project = project;
+    }
+
+    /**
+     * Create a ScriptRunner.
+     * @param manager      the script manager ("auto" | "bsf" | "javax")
+     * @param language     the language.
+     * @param classLoader  the classloader to use
+     * @return the created script runner.
+     * @throws BuildException if unable to create the ScriptRunner.
+     */
+    public ScriptRunnerBase createRunner(
+        String manager, String language, ClassLoader classLoader) {
+        this.manager      = manager;
+        this.language     = language;
+        this.scriptLoader = classLoader;
+
+        if (language == null) {
+            throw new BuildException("script language must be specified");
+        }
+        if (!manager.equals(AUTO) && !manager.equals(JAVAX) && !manager.equals(BSF)) {
+                throw new BuildException(
+                    "Unsupported language prefix " + manager);
+        }
+
+        // Check for bsf first then javax
+        // This version does not check if the scriptManager
+        // supports the language.
+
+        ScriptRunnerBase ret = null;
+        ret = createRunner(BSF, BSF_MANAGER, BSF_RUNNER);
+        if (ret == null) {
+            ret = createRunner(JAVAX, JAVAX_MANAGER, JAVAX_RUNNER);
+        }
+        if (ret != null) {
+            return ret;
+        }
+        if (JAVAX.equals(manager)) {
+            throw new BuildException(
+                "Unable to load the script engine manager "
+                + "(" + JAVAX_MANAGER + ")");
+        } else if (BSF.equals(manager)) {
+            throw new BuildException(
+                "Unable to load the BSF script engine manager "
+                + "(" + BSF_MANAGER + ")");
+        } else {
+            throw new BuildException(
+                "Unable to load a script engine manager "
+                + "(" + BSF_MANAGER + " or " + JAVAX_MANAGER + ")");
+        }
+    }
+
+    /**
+     * Create a script runner if the scriptManager matches the passed
+     * in manager.
+     * This checks if the script manager exists in the scriptLoader
+     * classloader and if so it creates and returns the script runner.
+     * @param checkManager check if the manager matchs this value.
+     * @param mangagerClass the name of the script manager class.
+     * @param runnerClass   the name of ant's script runner for this manager.
+     * @return the script runner class.
+     * @throws BuildException if there is a problem creating the runner class.
+     */
+    private ScriptRunnerBase createRunner(
+        String checkManager, String managerClass, String runnerClass) {
+        ScriptRunnerBase runner = null;
+        if (!manager.equals(AUTO) && !manager.equals(checkManager)) {
+            return null;
+        }
+        if (scriptLoader.getResource(
+                LoaderUtils.classNameToResource(managerClass)) == null) {
+            return null;
+        }
+        try {
+            runner = (ScriptRunnerBase) Class.forName(
+                runnerClass, true, scriptLoader).newInstance();
+            runner.setProject(project);
+            return runner;
+        } catch (Exception ex) {
+            ReflectUtil.throwBuildException(ex);
+            // NotReached
+        }
+
+        runner.setLanguage(language);
+        runner.setScriptClassLoader(scriptLoader);
+        return runner;
+    }
+}

Propchange: ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerCreator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java Sun Dec  3 20:51:50 2006
@@ -1,191 +1,191 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.tools.ant.util;
-
-import org.apache.tools.ant.ProjectComponent;
-import org.apache.tools.ant.types.Path;
-import java.io.File;
-import org.apache.tools.ant.types.Reference;
-
-
-/**
- * A class to help in creating, setting and getting
- * script runners.
- */
-public class ScriptRunnerHelper {
-    private ClasspathUtils.Delegate cpDelegate = null;
-    private File    srcFile;
-    private String  manager = "auto";
-    private String  language;
-    private String  text;
-    private boolean setBeans = true;
-    private ProjectComponent projectComponent;
-    private ClassLoader scriptLoader = null;
-
-    /**
-     * Set the project component associated with this helper.
-     * @param component the project component that owns this helper.
-     */
-    public void setProjectComponent(ProjectComponent component) {
-        this.projectComponent = component;
-    }
-
-    /**
-     * Create and set text on a script.
-     * @return the created or reused script runner.
-     */
-    public ScriptRunnerBase getScriptRunner() {
-        ScriptRunnerBase runner = getRunner();
-        if (srcFile != null) {
-            runner.setSrc(srcFile);
-        }
-        if (text != null) {
-            runner.addText(text);
-        }
-        if (setBeans) {
-            runner.bindToComponent(projectComponent);
-        } else {
-            runner.bindToComponentMinimum(projectComponent);
-        }
-        return runner;
-    }
-
-    /**
-     * Classpath to be used when searching for classes and resources.
-     *
-     * @return an empty Path instance to be configured by Ant.
-     */
-    public Path createClasspath() {
-        return getClassPathDelegate().createClasspath();
-    }
-
-    /**
-     * Set the classpath to be used when searching for classes and resources.
-     *
-     * @param classpath an Ant Path object containing the search path.
-     */
-    public void setClasspath(Path classpath) {
-        getClassPathDelegate().setClasspath(classpath);
-    }
-
-    /**
-     * Set the classpath by reference.
-     *
-     * @param r a Reference to a Path instance to be used as the classpath
-     *          value.
-     */
-    public void setClasspathRef(Reference r) {
-        getClassPathDelegate().setClasspathref(r);
-    }
-
-    /**
-     * Load the script from an external file ; optional.
-     *
-     * @param file the file containing the script source.
-     */
-    public void setSrc(File file) {
-        this.srcFile = file;
-    }
-
-    /**
-     * The script text.
-     *
-     * @param text a component of the script text to be added.
-     */
-    public void addText(String text) {
-        this.text = text;
-    }
-
-    /**
-     * Defines the script manager - defaults to "auto".
-     *
-     * @param manager the scripting manager - "bsf" or "javax" or "auto"
-     */
-    public void setManager(String manager) {
-        this.manager = manager;
-    }
-
-    /**
-     * Defines the language (required).
-     *
-     * @param language the scripting language name for the script.
-     */
-    public void setLanguage(String language) {
-        this.language = language;
-    }
-
-    /**
-     * Get the language.
-     * @return the scripting language.
-     */
-    public String getLanguage() {
-        return language;
-    }
-
-    /**
-     * Set the setbeans attribute.
-     * If this is true, &lt;script&gt; will create variables in the
-     * script instance for all
-     * properties, targets and references of the current project.
-     * It this is false, only the project and self variables will
-     * be set.
-     * The default is true.
-     * @param setBeans the value to set.
-     */
-    public void setSetBeans(boolean setBeans) {
-        this.setBeans = setBeans;
-    }
-
-    /**
-     * Used when called by scriptdef.
-     * @param loader the loader used by scriptdef.
-     */
-    public void setClassLoader(ClassLoader loader) {
-        scriptLoader = loader;
-    }
-
-
-    private ClassLoader generateClassLoader() {
-        if (scriptLoader != null) {
-            return scriptLoader;
-        }
-        if (cpDelegate == null) {
-            scriptLoader = getClass().getClassLoader();
-            return scriptLoader;
-        }
-
-        scriptLoader = cpDelegate.getClassLoader();
-        return scriptLoader;
-    }
-
-    private ClasspathUtils.Delegate getClassPathDelegate() {
-        if (cpDelegate == null) {
-            cpDelegate = ClasspathUtils.getDelegate(projectComponent);
-        }
-        return cpDelegate;
-    }
-
-    /**
-     * Get a script runner.
-     */
-    private ScriptRunnerBase getRunner() {
-        return new ScriptRunnerCreator(
-            projectComponent.getProject()).createRunner(
-                manager, language, generateClassLoader());
-    }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.tools.ant.util;
+
+import org.apache.tools.ant.ProjectComponent;
+import org.apache.tools.ant.types.Path;
+import java.io.File;
+import org.apache.tools.ant.types.Reference;
+
+
+/**
+ * A class to help in creating, setting and getting
+ * script runners.
+ */
+public class ScriptRunnerHelper {
+    private ClasspathUtils.Delegate cpDelegate = null;
+    private File    srcFile;
+    private String  manager = "auto";
+    private String  language;
+    private String  text;
+    private boolean setBeans = true;
+    private ProjectComponent projectComponent;
+    private ClassLoader scriptLoader = null;
+
+    /**
+     * Set the project component associated with this helper.
+     * @param component the project component that owns this helper.
+     */
+    public void setProjectComponent(ProjectComponent component) {
+        this.projectComponent = component;
+    }
+
+    /**
+     * Create and set text on a script.
+     * @return the created or reused script runner.
+     */
+    public ScriptRunnerBase getScriptRunner() {
+        ScriptRunnerBase runner = getRunner();
+        if (srcFile != null) {
+            runner.setSrc(srcFile);
+        }
+        if (text != null) {
+            runner.addText(text);
+        }
+        if (setBeans) {
+            runner.bindToComponent(projectComponent);
+        } else {
+            runner.bindToComponentMinimum(projectComponent);
+        }
+        return runner;
+    }
+
+    /**
+     * Classpath to be used when searching for classes and resources.
+     *
+     * @return an empty Path instance to be configured by Ant.
+     */
+    public Path createClasspath() {
+        return getClassPathDelegate().createClasspath();
+    }
+
+    /**
+     * Set the classpath to be used when searching for classes and resources.
+     *
+     * @param classpath an Ant Path object containing the search path.
+     */
+    public void setClasspath(Path classpath) {
+        getClassPathDelegate().setClasspath(classpath);
+    }
+
+    /**
+     * Set the classpath by reference.
+     *
+     * @param r a Reference to a Path instance to be used as the classpath
+     *          value.
+     */
+    public void setClasspathRef(Reference r) {
+        getClassPathDelegate().setClasspathref(r);
+    }
+
+    /**
+     * Load the script from an external file ; optional.
+     *
+     * @param file the file containing the script source.
+     */
+    public void setSrc(File file) {
+        this.srcFile = file;
+    }
+
+    /**
+     * The script text.
+     *
+     * @param text a component of the script text to be added.
+     */
+    public void addText(String text) {
+        this.text = text;
+    }
+
+    /**
+     * Defines the script manager - defaults to "auto".
+     *
+     * @param manager the scripting manager - "bsf" or "javax" or "auto"
+     */
+    public void setManager(String manager) {
+        this.manager = manager;
+    }
+
+    /**
+     * Defines the language (required).
+     *
+     * @param language the scripting language name for the script.
+     */
+    public void setLanguage(String language) {
+        this.language = language;
+    }
+
+    /**
+     * Get the language.
+     * @return the scripting language.
+     */
+    public String getLanguage() {
+        return language;
+    }
+
+    /**
+     * Set the setbeans attribute.
+     * If this is true, &lt;script&gt; will create variables in the
+     * script instance for all
+     * properties, targets and references of the current project.
+     * It this is false, only the project and self variables will
+     * be set.
+     * The default is true.
+     * @param setBeans the value to set.
+     */
+    public void setSetBeans(boolean setBeans) {
+        this.setBeans = setBeans;
+    }
+
+    /**
+     * Used when called by scriptdef.
+     * @param loader the loader used by scriptdef.
+     */
+    public void setClassLoader(ClassLoader loader) {
+        scriptLoader = loader;
+    }
+
+
+    private ClassLoader generateClassLoader() {
+        if (scriptLoader != null) {
+            return scriptLoader;
+        }
+        if (cpDelegate == null) {
+            scriptLoader = getClass().getClassLoader();
+            return scriptLoader;
+        }
+
+        scriptLoader = cpDelegate.getClassLoader();
+        return scriptLoader;
+    }
+
+    private ClasspathUtils.Delegate getClassPathDelegate() {
+        if (cpDelegate == null) {
+            cpDelegate = ClasspathUtils.getDelegate(projectComponent);
+        }
+        return cpDelegate;
+    }
+
+    /**
+     * Get a script runner.
+     */
+    private ScriptRunnerBase getRunner() {
+        return new ScriptRunnerCreator(
+            projectComponent.getProject()).createRunner(
+                manager, language, generateClassLoader());
+    }
+}

Propchange: ant/core/trunk/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/facade/ImplementationSpecificArgument.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/facade/ImplementationSpecificArgument.java?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/facade/ImplementationSpecificArgument.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/facade/ImplementationSpecificArgument.java Sun Dec  3 20:51:50 2006
@@ -58,4 +58,4 @@
             return new String[0];
         }
     }
-}
\ No newline at end of file
+}

Modified: ant/core/trunk/src/tests/antunit/taskdefs/delete-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/delete-test.xml?view=diff&rev=482069&r1=482068&r2=482069
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/delete-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/delete-test.xml Sun Dec  3 20:51:50 2006
@@ -1,64 +1,64 @@
-<?xml version="1.0"?>
-
-<project name="delete-test" basedir="." default="all"
-       xmlns:au="antlib:org.apache.ant.antunit">
-  <property name="working.dir" value="working"/>
-  <property name="existing.dir" value="working/exists"/>
-  <property name="nonexistent.dir" value="working/nonexists"/>
-	
-  <target name="all">
-    <au:antunit>
-      <fileset file="${ant.file}"/>
-      <au:plainlistener/>
-    </au:antunit>
-  </target>
-
-
-  <target name="init">
-    <delete dir="${working.dir}"/>
-    <mkdir dir="${working.dir}"/>
-    <mkdir dir="${existing.dir}"/>
-  </target>
-
-  <target name="tearDown">
-    <delete dir="${working.dir}"/>
-  </target>
-
-  <!--test that you can delete a fileset with a nonexistent dir without failure-->
-  <target name="testdelfileset" depends="init">
-    <delete quiet="true" includeEmptyDirs="true">
-       <fileset dir="${nonexistent.dir}"/>
-    </delete>
-
-  	<au:assertFileExists file="${existing.dir}" />
-  		
-    <delete quiet="true" includeEmptyDirs="true">
-       <fileset dir="${existing.dir}"/>
-    </delete>
-
-  	<au:assertFileDoesntExist file="${existing.dir}" />
-
-  	
-    <mkdir dir="${existing.dir}"/>
-
-    <delete quiet="true" includeEmptyDirs="true">
-       <fileset dir="${nonexistent.dir}"/>
-       <fileset dir="${existing.dir}"/>
-    </delete>
-
-
-  	<au:assertFileDoesntExist file="${existing.dir}" />
-
-    <mkdir dir="${existing.dir}"/>
-
-    <delete quiet="true" includeEmptyDirs="true">
-       <fileset dir="${existing.dir}"/>
-       <fileset dir="${nonexistent.dir}"/>
-    </delete>
-
-
-  	<au:assertFileDoesntExist file="${existing.dir}" />
-
-  </target>
-
-</project>
+<?xml version="1.0"?>
+
+<project name="delete-test" basedir="." default="all"
+       xmlns:au="antlib:org.apache.ant.antunit">
+  <property name="working.dir" value="working"/>
+  <property name="existing.dir" value="working/exists"/>
+  <property name="nonexistent.dir" value="working/nonexists"/>
+	
+  <target name="all">
+    <au:antunit>
+      <fileset file="${ant.file}"/>
+      <au:plainlistener/>
+    </au:antunit>
+  </target>
+
+
+  <target name="init">
+    <delete dir="${working.dir}"/>
+    <mkdir dir="${working.dir}"/>
+    <mkdir dir="${existing.dir}"/>
+  </target>
+
+  <target name="tearDown">
+    <delete dir="${working.dir}"/>
+  </target>
+
+  <!--test that you can delete a fileset with a nonexistent dir without failure-->
+  <target name="testdelfileset" depends="init">
+    <delete quiet="true" includeEmptyDirs="true">
+       <fileset dir="${nonexistent.dir}"/>
+    </delete>
+
+  	<au:assertFileExists file="${existing.dir}" />
+  		
+    <delete quiet="true" includeEmptyDirs="true">
+       <fileset dir="${existing.dir}"/>
+    </delete>
+
+  	<au:assertFileDoesntExist file="${existing.dir}" />
+
+  	
+    <mkdir dir="${existing.dir}"/>
+
+    <delete quiet="true" includeEmptyDirs="true">
+       <fileset dir="${nonexistent.dir}"/>
+       <fileset dir="${existing.dir}"/>
+    </delete>
+
+
+  	<au:assertFileDoesntExist file="${existing.dir}" />
+
+    <mkdir dir="${existing.dir}"/>
+
+    <delete quiet="true" includeEmptyDirs="true">
+       <fileset dir="${existing.dir}"/>
+       <fileset dir="${nonexistent.dir}"/>
+    </delete>
+
+
+  	<au:assertFileDoesntExist file="${existing.dir}" />
+
+  </target>
+
+</project>

Propchange: ant/core/trunk/src/tests/antunit/taskdefs/delete-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native



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