diff --git a/proposal/mutant/bootstrap.bat b/proposal/mutant/bootstrap.bat index 50a3f73f6..26c57f75d 100755 --- a/proposal/mutant/bootstrap.bat +++ b/proposal/mutant/bootstrap.bat @@ -27,3 +27,6 @@ java -classpath bootstrap\lib\start.jar;bootstrap\lib\init.jar org.apache.ant.st REM Use the full build as the build used by the build script xcopy /s dist bootstrap + +REM clean up after bootstrap +java -classpath bootstrap\lib\start.jar:bootstrap\lib\init.jar org.apache.ant.start.Main clean diff --git a/proposal/mutant/build.xml b/proposal/mutant/build.xml index e5591c6f3..5cf5a250a 100644 --- a/proposal/mutant/build.xml +++ b/proposal/mutant/build.xml @@ -35,7 +35,8 @@ - + @@ -99,6 +100,14 @@ + + + + + + + + @@ -155,14 +164,8 @@ - - - - - - + classname="com.puppycrawl.tools.checkstyle.CheckStyleTask"/> - - @@ -68,6 +66,7 @@ + diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ComponentManager.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ComponentManager.java index f6cf43dfa..baa8a0d84 100644 --- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ComponentManager.java +++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ComponentManager.java @@ -317,11 +317,34 @@ public class ComponentManager implements ComponentService { * on the component type. * @exception ExecutionException if the component cannot be created */ - public Object createComponent(String componentName) - throws ExecutionException { + public Object createComponent(String componentName) + throws ExecutionException { return createComponent(componentName, null); } + /** + * Create a component given its class. The component will have a context + * but will not be configured. It should be configured using the + * appropriate set methods and then validated before being used. + * + * @param componentClass the component's class + * @param factory the factory to create the component + * @param loader the classloader associated with the component + * @param addTaskAdapter whenther the returned component should be a + * task, potentially being wrapped in an adapter + * @param componentName the name of the component type + * @return the created component. The return type of this method depends + * on the component type. + * @exception ExecutionException if the component cannot be created + */ + public Object createComponent(AntLibFactory factory, ClassLoader loader, + Class componentClass, boolean addTaskAdapter, + String componentName) + throws ExecutionException { + return createComponent(loader, factory, componentClass, + componentName, componentName, addTaskAdapter, null); + } + /** * Set the standard libraries (i.e. those which are independent of the * build files) to be used in this component manager @@ -421,82 +444,39 @@ public class ComponentManager implements ComponentService { protected Object createComponent(String componentName, BuildElement model) throws ExecutionException { + Location location = Location.UNKNOWN_LOCATION; + if (model != null) { + location = model.getLocation(); + } ImportInfo definition = getDefinition(componentName); if (definition == null) { throw new ExecutionException("There is no definition of the <" - + componentName + "> component"); + + componentName + "> component"); } String className = definition.getClassName(); - + ComponentLibrary componentLibrary = definition.getComponentLibrary(); + boolean isTask = definition.getDefinitionType() == AntLibrary.TASKDEF; String localName = definition.getLocalName(); try { ClassLoader componentLoader = componentLibrary.getClassLoader(); Class componentClass = Class.forName(className, true, componentLoader); AntLibFactory libFactory = getLibFactory(componentLibrary); - Location location = Location.UNKNOWN_LOCATION; - if (model != null) { - location = model.getLocation(); - } - - Object component - = libFactory.createComponent(componentClass, localName); - - ExecutionComponent execComponent = null; - if (definition.getDefinitionType() == AntLibrary.TASKDEF) { - if (component instanceof Task) { - execComponent = (Task)component; - } else { - execComponent = new TaskAdapter(componentName, component); - } - } else if (component instanceof ExecutionComponent) { - execComponent = (ExecutionComponent)component; - } - - ExecutionContext context - = new ExecutionContext(frame, execComponent, location); - context.setClassLoader(componentLoader); - ClassLoader currentLoader - = LoaderUtils.setContextLoader(componentLoader); - if (execComponent != null) { - execComponent.init(context, componentName); - } - if (model != null) { - configureElement(libFactory, component, model); - if (execComponent != null) { - execComponent.validateComponent(); - } - } - LoaderUtils.setContextLoader(currentLoader); - if (execComponent != null) { - return execComponent; - } - - return component; + return createComponent(componentLoader, libFactory, componentClass, + componentName, localName, isTask, model); } catch (ClassNotFoundException e) { throw new ExecutionException("Class " + className + " for component <" + componentName + "> was not found", e, - model.getLocation()); + location); } catch (NoClassDefFoundError e) { throw new ExecutionException("Could not load a dependent class (" + e.getMessage() + ") for component " + componentName, - e, model.getLocation()); - } catch (InstantiationException e) { - throw new ExecutionException("Unable to instantiate component " - + "class " + className + " for component <" + componentName - + ">", e, model.getLocation()); - } catch (IllegalAccessException e) { - throw new ExecutionException("Unable to access task class " - + className + " for component <" + componentName + ">", - e, model.getLocation()); + e, location); } catch (ExecutionException e) { e.setLocation(model.getLocation(), false); throw e; - } catch (RuntimeException e) { - throw new ExecutionException(e.getClass().getName() + ": " - + e.getMessage(), e, model.getLocation()); } } @@ -545,6 +525,100 @@ public class ComponentManager implements ComponentService { return setter; } + /** + * Create a component - handles all the variations + * + * @param loader the component's classloader + * @param componentClass The class of the component. + * @param componentName The component's name in the global context + * @param addTaskAdapter whether the component should add a Task adapter + * to make this component a Task. + * @param localName The name of the component within its library + * @param model the BuildElement model of the component's configuration + * @param factory the facrtory object used to create the component + * @return the required component potentially wrapped in a wrapper + * object. + * @exception ExecutionException if the component cannot be created + */ + private Object createComponent(ClassLoader loader, AntLibFactory factory, + Class componentClass, String componentName, + String localName, boolean addTaskAdapter, + BuildElement model) + throws ExecutionException { + // set the location to unknown unless we have a build model to use + Location location = Location.UNKNOWN_LOCATION; + if (model != null) { + location = model.getLocation(); + } + + try { + // create the component using the factory + Object component + = factory.createComponent(componentClass, localName); + + // wrap the component in an adapter if required. + ExecutionComponent execComponent = null; + if (addTaskAdapter) { + if (component instanceof Task) { + execComponent = (Task)component; + } else { + execComponent = new TaskAdapter(componentName, component); + } + } else if (component instanceof ExecutionComponent) { + execComponent = (ExecutionComponent)component; + } + + // set the context loader to that for the component + ClassLoader currentLoader + = LoaderUtils.setContextLoader(loader); + + // if the component is an execution component create a context and + // initialise the component with it. + if (execComponent != null) { + ExecutionContext context + = new ExecutionContext(frame, execComponent, location); + context.setClassLoader(loader); + execComponent.init(context, componentName); + } + + // if we have a model, use it to configure the component. Otherwise + // the caller is expected to configure thre object + if (model != null) { + configureElement(factory, component, model); + // if the component is an execution component and we have a + // model, validate it + if (execComponent != null) { + execComponent.validateComponent(); + } + } + + // reset the loader + LoaderUtils.setContextLoader(currentLoader); + + // if we have an execution component, potentially a wrapper, + // return it otherwise the component directly + if (execComponent != null) { + return execComponent; + } else { + return component; + } + } catch (InstantiationException e) { + throw new ExecutionException("Unable to instantiate component " + + "class " + componentClass.getName() + " for component <" + + componentName + ">", e, location); + } catch (IllegalAccessException e) { + throw new ExecutionException("Unable to access task class " + + componentClass.getName() + " for component <" + + componentName + ">", e, location); + } catch (ExecutionException e) { + e.setLocation(location, false); + throw e; + } catch (RuntimeException e) { + throw new ExecutionException(e.getClass().getName() + ": " + + e.getMessage(), e, location); + } + } + /** * Create an instance of a type given its required class * diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/CoreExecService.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/CoreExecService.java index fa3c670d7..69fc21715 100644 --- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/CoreExecService.java +++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/CoreExecService.java @@ -154,7 +154,7 @@ public class CoreExecService implements ExecService { Throwable failureCause = null; try { ClassLoader currentLoader - = LoaderUtils.setContextLoader(execContext.getLoader()); + = LoaderUtils.setContextLoader(execContext.getClassLoader()); task.execute(); LoaderUtils.setContextLoader(currentLoader); } catch (Throwable e) { diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ExecutionContext.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ExecutionContext.java index 1babfbfd5..0a23f54c7 100755 --- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ExecutionContext.java +++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ExecutionContext.java @@ -160,11 +160,11 @@ public class ExecutionContext implements AntContext { } /** - * Gets the loader for this task + * Gets the loader for this context * - * @return the task's loader + * @return the context's loader */ - protected ClassLoader getLoader() { + public ClassLoader getClassLoader() { return loader; } diff --git a/proposal/mutant/src/java/antlibs/ant1compat/antlib.xml b/proposal/mutant/src/java/antlibs/ant1compat/antlib.xml index 55ac9fc83..a73242d9c 100644 --- a/proposal/mutant/src/java/antlibs/ant1compat/antlib.xml +++ b/proposal/mutant/src/java/antlibs/ant1compat/antlib.xml @@ -1,14 +1,13 @@ + reqxml="true" reqtools="true" + extends="ant.system"> - - @@ -89,7 +88,6 @@ - @@ -102,7 +100,6 @@ - diff --git a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java index a45c31abb..90a59a218 100644 --- a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java +++ b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java @@ -870,24 +870,59 @@ public class Project implements org.apache.ant.common.event.BuildListener { * @return the created task instance */ public Task createTask(String taskType) { - // we piggy back the task onto the current context Task task = null; - Class c = (Class)taskClassDefinitions.get(taskType); + Class taskClass = (Class)taskClassDefinitions.get(taskType); - if (c == null) { + if (taskClass == null) { return null; } try { - task = (Task)c.newInstance(); - task.setProject(this); - task.init(context, taskType); + Object taskObject = componentService.createComponent(factory, + context.getClassLoader(), taskClass, false, taskType); + if (taskObject instanceof Task) { + task = (Task)taskObject; + } else { + TaskAdapter adapter = new TaskAdapter(); + adapter.setProxy(taskObject); + task = adapter; + } + task.setTaskType(taskType); + task.setTaskName(taskType); return task; } catch (Throwable e) { throw new BuildException(e); } } + /** + * Creates a new instance of a data type. + * + * @param typeName The name of the data type to create an instance of. + * Must not be null. + * + * @return an instance of the specified data type, or null if + * the data type name is not recognised. + * + * @exception BuildException if the data type name is recognised but + * instance creation fails. + */ + public Object createDataType(String typeName) throws BuildException { + Class typeClass = (Class)dataClassDefinitions.get(typeName); + + if (typeClass == null) { + return null; + } + + try { + Object dataInstance = componentService.createComponent(factory, + context.getClassLoader(), typeClass, false, typeName); + return dataInstance; + } catch (Throwable e) { + throw new BuildException(e); + } + } + /** send build started event to the listeners */ protected void fireBuildStarted() { BuildEvent event = new BuildEvent(this); diff --git a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Task.java b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Task.java index 07bf003c1..4659b5ef9 100644 --- a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Task.java +++ b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Task.java @@ -133,7 +133,7 @@ public abstract class Task extends ProjectComponent /** - * Add a nested task to this Ant1 task. + * Add a nested task to this Ant1 task. * * @param task The task to be added * @exception ExecutionException if the task cannot be added. @@ -173,6 +173,10 @@ public abstract class Task extends ProjectComponent } + /** Initialise this task */ + public void init() { + } + /** Validate this component */ public void validateComponent() { // no default validation for Ant1 tasks diff --git a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/Ant.java b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/Ant.java new file mode 100644 index 000000000..4563483ed --- /dev/null +++ b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/Ant.java @@ -0,0 +1,64 @@ +/* + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2002 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, if + * any, must include the following acknowlegement: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowlegement may appear in the software itself, + * if and wherever such third-party acknowlegements normally appear. + * + * 4. The names "The Jakarta Project", "Ant", and "Apache Software + * Foundation" must not be used to endorse or promote products derived + * from this software without prior written permission. For written + * permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache" + * nor may "Apache" appear in their names without prior written + * permission of the Apache Group. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + */ +package org.apache.tools.ant; + +/** + * Ant facade over system version of Ant + * + * @author Conor MacNeill + * @created 31 January 2002 + */ +public class Ant extends org.apache.ant.antlib.system.Ant { +} + diff --git a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/CallTarget.java b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/CallTarget.java new file mode 100644 index 000000000..abb1700a6 --- /dev/null +++ b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/CallTarget.java @@ -0,0 +1,66 @@ +/* + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2002 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, if + * any, must include the following acknowlegement: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowlegement may appear in the software itself, + * if and wherever such third-party acknowlegements normally appear. + * + * 4. The names "The Jakarta Project", "Ant", and "Apache Software + * Foundation" must not be used to endorse or promote products derived + * from this software without prior written permission. For written + * permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache" + * nor may "Apache" appear in their names without prior written + * permission of the Apache Group. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + */ +package org.apache.tools.ant; + +import org.apache.ant.antlib.system.AntCall; + +/** + * CallTarget facade over AntCall + * + * @author Conor MacNeill + * @created 31 January 2002 + */ +public class CallTarget extends AntCall { +} + diff --git a/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/Ant1CompatBuilder.java b/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/Ant1CompatBuilder.java index e77fb04f2..fcc8a48ac 100644 --- a/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/Ant1CompatBuilder.java +++ b/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/Ant1CompatBuilder.java @@ -1,5 +1,4 @@ package org.apache.ant.builder; - public class Ant1CompatBuilder { protected void _init(BuildHelper helper) { helper.setProperty("src.dir", "src"); @@ -16,10 +15,13 @@ public class Ant1CompatBuilder { helper.setProperty("util.package", "${ant.package}/util"); helper.setProperty("regexp.package", "${util.package}/regexp"); helper.createPath("classpath"); - helper.addFileSetToPath("classpath", "${lib.dir}/parser", "*.jar"); - helper.addFileSetToPath("classpath", "${lib.dir}/ant1compat", "*.jar"); + helper.addFileSetToPath("classpath", + "${lib.dir}/parser", "*.jar"); + helper.addFileSetToPath("classpath", + "${lib.dir}/ant1compat", "*.jar"); helper.addPathElementToPath("classpath", "${distlib.dir}/init.jar"); helper.addPathElementToPath("classpath", "${distlib.dir}/common/common.jar"); + helper.addPathElementToPath("classpath", "${distlib.dir}/antlibs/system.tsk"); } protected void check_for_optional_packages(BuildHelper helper) { } diff --git a/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/MutantBuilder.java b/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/MutantBuilder.java index 0fa3e18a5..bf794f316 100644 --- a/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/MutantBuilder.java +++ b/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/MutantBuilder.java @@ -10,7 +10,8 @@ public class MutantBuilder { helper.setProperty("distlib.dir", "${dist.dir}/lib"); helper.setProperty("debug", "true"); helper.createPath("classpath.parser"); - helper.addFileSetToPath("classpath.parser", "${lib.dir}/parser", "*.jar"); + helper.addFileSetToPath("classpath.parser", + "${lib.dir}/parser", "*.jar"); helper.createPath("classpath.common"); helper.addPathElementToPath("classpath.common", "${distlib.dir}/init.jar"); helper.createPath("classpath.antcore"); @@ -60,6 +61,8 @@ public class MutantBuilder { helper.javac("${java.dir}/start", "${bin.dir}/start", "classpath.start"); helper.jar("${bin.dir}/start", "${distlib.dir}/start.jar", null, null); + helper.jar("${bin.dir}/start", "${distlib.dir}/ant.jar", + null, null); } protected void ant1compat(BuildHelper helper) { } @@ -86,9 +89,6 @@ public class MutantBuilder { protected void main(BuildHelper helper) { } protected void checkstyle(BuildHelper helper) { - helper.setProperty("checkstyle.bin", "../checkstyle"); - helper.createPath("checkstyle.path"); - helper.addFileSetToPath("checkstyle.path", "${checkstyle.bin}", null); helper.mkdir("${bin.dir}/check"); } protected void javadocs(BuildHelper helper) { diff --git a/proposal/mutant/src/java/common/org/apache/ant/common/antlib/AntContext.java b/proposal/mutant/src/java/common/org/apache/ant/common/antlib/AntContext.java index 1f4ac3525..cd3c11905 100644 --- a/proposal/mutant/src/java/common/org/apache/ant/common/antlib/AntContext.java +++ b/proposal/mutant/src/java/common/org/apache/ant/common/antlib/AntContext.java @@ -99,5 +99,12 @@ public interface AntContext { * @return the location */ Location getLocation(); + + /** + * Get the classloader associated with this context + * + * @return a classloader instance. + */ + ClassLoader getClassLoader(); } diff --git a/proposal/mutant/src/java/common/org/apache/ant/common/service/ComponentService.java b/proposal/mutant/src/java/common/org/apache/ant/common/service/ComponentService.java index ad2a223bb..a306eef11 100644 --- a/proposal/mutant/src/java/common/org/apache/ant/common/service/ComponentService.java +++ b/proposal/mutant/src/java/common/org/apache/ant/common/service/ComponentService.java @@ -171,5 +171,23 @@ public interface ComponentService { */ Object createComponent(String componentName) throws ExecutionException; + /** + * Create a component given its class. The component will have a context + * but will not be configured. It should be configured using the + * appropriate set methods and then validated before being used. + * + * @param componentClass the component's class + * @param factory the factory to create the component + * @param loader the classloader associated with the component + * @param addTaskAdapter whenther the returned component should be a + * task, potentially being wrapped in an adapter + * @param componentName the name of the component type + * @return the created component. The return type of this method depends + * on the component type. + * @exception ExecutionException if the component cannot be created + */ + Object createComponent(AntLibFactory factory, ClassLoader loader, + Class componentClass, boolean addTaskAdapter, + String componentName) throws ExecutionException; }