Here it is.
The java files are to be added into the test source package
org.apache.tools.ant, the patch itself works from the cvs root directory. I
hope, it runs on Java 1.1, but I don't have means to ensure that.
Cheers,
Ralf.
--
Ralf Wiebicke <[EMAIL PROTECTED]>
http://rw7.de/ralf/
backup: Ralf Wiebicke <[EMAIL PROTECTED]>
Index: src/etc/testcases/taskdefs/taskdef.xml
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/etc/testcases/taskdefs/taskdef.xml,v
retrieving revision 1.4
diff -c -u -r1.4 taskdef.xml
--- src/etc/testcases/taskdefs/taskdef.xml 2001/07/26 15:38:48 1.4
+++ src/etc/testcases/taskdefs/taskdef.xml 2001/10/31 15:43:02
@@ -22,6 +22,10 @@
<taskdef name="test" classname="org.apache.tools.ant.Project" />
</target>
+ <target name="test5a">
+ <taskdef name="test" classname="org.apache.tools.ant.taskdefs.Copy" />
+ </target>
+
<target name="test6">
<echo message="${build.test}" />
<taskdef name="test6"
Index: src/main/org/apache/tools/ant/Project.java
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/Project.java,v
retrieving revision 1.77
diff -c -u -r1.77 Project.java
--- src/main/org/apache/tools/ant/Project.java 2001/10/28 21:25:26 1.77
+++ src/main/org/apache/tools/ant/Project.java 2001/10/31 15:43:08
@@ -62,6 +62,7 @@
import java.util.Properties;
import java.util.Enumeration;
import java.util.Stack;
+import java.lang.reflect.Modifier;
import org.apache.tools.ant.types.FilterSet;
@@ -414,7 +415,37 @@
String msg = " +User task: " + taskName + " " + taskClass.getName();
log(msg, MSG_DEBUG);
+ checkTaskClass(taskClass);
taskClassDefinitions.put(taskName, taskClass);
+ }
+
+ /**
+ * Checks a class, whether it is suitable for serving as ant task.
+ * Throws a BuildException and logs as Project.MSG_ERR for
+ * conditions, that will cause the task execution to fail.
+ */
+ public void checkTaskClass(final Class taskClass) {
+ if(!Modifier.isPublic(taskClass.getModifiers())) {
+ final String message = taskClass + " is not public";
+ log(message, Project.MSG_ERR);
+ throw new BuildException(message);
+ }
+ if(Modifier.isAbstract(taskClass.getModifiers())) {
+ final String message = taskClass + " is abstract";
+ log(message, Project.MSG_ERR);
+ throw new BuildException(message);
+ }
+ try {
+ taskClass.getConstructor( null );
+ // don't have to check for public, since
+ // getConstructor finds public constructors only.
+ } catch(NoSuchMethodException e) {
+ final String message = "No public default constructor in " + taskClass;
+ log(message, Project.MSG_ERR);
+ throw new BuildException(message);
+ }
+ if( !Task.class.isAssignableFrom(taskClass) )
+ TaskAdapter.checkTaskClass(taskClass, this);
}
public Hashtable getTaskDefinitions() {
Index: src/main/org/apache/tools/ant/TaskAdapter.java
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/TaskAdapter.java,v
retrieving revision 1.8
diff -c -u -r1.8 TaskAdapter.java
--- src/main/org/apache/tools/ant/TaskAdapter.java 2001/10/28 21:25:26 1.8
+++ src/main/org/apache/tools/ant/TaskAdapter.java 2001/10/31 15:43:08
@@ -55,6 +55,7 @@
package org.apache.tools.ant;
import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
/**
@@ -68,6 +69,37 @@
Object proxy;
/**
+ * Checks a class, whether it is suitable to be adapted by TaskAdapter.
+ *
+ * Checks conditions only, which are additionally required for a tasks
+ * adapted by TaskAdapter. Thus, this method should be called by
+ * [EMAIL PROTECTED] Project.checkTaskClass}.
+ *
+ * Throws a BuildException and logs as Project.MSG_ERR for
+ * conditions, that will cause the task execution to fail.
+ * Logs other suspicious conditions with Project.MSG_WARN.
+ */
+ public static void checkTaskClass(final Class taskClass, final Project project) {
+ // don't have to check for interface, since then
+ // taskClass would be abstract too.
+ try {
+ final Method executeM = taskClass.getMethod( "execute", null );
+ // don't have to check for public, since
+ // getMethod finds public method only.
+ // don't have to check for abstract, since then
+ // taskClass would be abstract too.
+ if(executeM.getReturnType()!=void.class) {
+ final String message = "return type of execute() should be void but was \""+executeM.getReturnType()+"\" in " + taskClass;
+ project.log(message, Project.MSG_WARN);
+ }
+ } catch(NoSuchMethodException e) {
+ final String message = "No public execute() in " + taskClass;
+ project.log(message, Project.MSG_ERR);
+ throw new BuildException(message);
+ }
+ }
+
+ /**
* Do the execution.
*/
public void execute() throws BuildException {
@@ -94,8 +126,8 @@
Class c=proxy.getClass();
executeM=c.getMethod( "execute", new Class[0] );
if( executeM == null ) {
- log("No execute in " + proxy.getClass(), Project.MSG_ERR);
- throw new BuildException("No execute in " + proxy.getClass());
+ log("No public execute() in " + proxy.getClass(), Project.MSG_ERR);
+ throw new BuildException("No public execute() in " + proxy.getClass());
}
executeM.invoke(proxy, null);
return;
Index: src/main/org/apache/tools/ant/taskdefs/Taskdef.java
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Taskdef.java,v
retrieving revision 1.15
diff -c -u -r1.15 Taskdef.java
--- src/main/org/apache/tools/ant/taskdefs/Taskdef.java 2001/06/07 11:42:08 1.15
+++ src/main/org/apache/tools/ant/taskdefs/Taskdef.java 2001/10/31 15:43:10
@@ -54,6 +54,8 @@
package org.apache.tools.ant.taskdefs;
+import org.apache.tools.ant.BuildException;
+
/**
* Define a new task.
*
@@ -61,6 +63,10 @@
*/
public class Taskdef extends Definer {
protected void addDefinition(String name, Class c) {
- project.addTaskDefinition(name, c);
+ try {
+ project.addTaskDefinition(name, c);
+ } catch(BuildException e) {
+ throw new BuildException(e.getMessage(), e.getException(), getLocation());
+ }
}
}
Index: src/testcases/org/apache/tools/ant/ProjectTest.java
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/testcases/org/apache/tools/ant/ProjectTest.java,v
retrieving revision 1.7
diff -c -u -r1.7 ProjectTest.java
--- src/testcases/org/apache/tools/ant/ProjectTest.java 2001/10/23 10:35:14 1.7
+++ src/testcases/org/apache/tools/ant/ProjectTest.java 2001/10/31 15:43:13
@@ -71,6 +71,7 @@
private Project p;
private String root;
+ private MockBuildListener mbl;
public ProjectTest(String name) {
super(name);
@@ -80,6 +81,7 @@
p = new Project();
p.init();
root = new File(File.separator).getAbsolutePath();
+ mbl = new MockBuildListener(p);
}
public void testDataTypes() throws BuildException {
@@ -155,4 +157,64 @@
path = root + path.substring(1);
return path.replace('\\', File.separatorChar).replace('/', File.separatorChar);
}
+
+
+ private void assertTaskDefFails(final Class taskClass,
+ final String message) {
+ final String dummyName = "testTaskDefinitionDummy";
+ try {
+ mbl.addBuildEvent(message, Project.MSG_ERR);
+ p.addTaskDefinition(dummyName, taskClass);
+ fail("expected BuildException(\""+message+"\", Project.MSG_ERR) when adding task " + taskClass);
+ }
+ catch(BuildException e) {
+ assertEquals(message, e.getMessage());
+ mbl.assertEmpty();
+ assert(!p.getTaskDefinitions().containsKey(dummyName));
+ }
+ }
+
+ public void testAddTaskDefinition() {
+ p.addBuildListener(mbl);
+
+ p.addTaskDefinition("Ok", DummyTaskOk.class);
+ assertEquals(DummyTaskOk.class, p.getTaskDefinitions().get("Ok"));
+ p.addTaskDefinition("OkNonTask", DummyTaskOkNonTask.class);
+ assertEquals(DummyTaskOkNonTask.class, p.getTaskDefinitions().get("OkNonTask"));
+ mbl.assertEmpty();
+
+ assertTaskDefFails(DummyTaskPrivate.class, DummyTaskPrivate.class + " is not public");
+ assertTaskDefFails(DummyTaskProtected.class, DummyTaskProtected.class + " is not public");
+ assertTaskDefFails(DummyTaskPackage.class, DummyTaskPackage.class + " is not public");
+
+ assertTaskDefFails(DummyTaskAbstract.class, DummyTaskAbstract.class + " is abstract");
+ assertTaskDefFails(DummyTaskInterface.class, DummyTaskInterface.class + " is abstract");
+
+ assertTaskDefFails(DummyTaskWithoutDefaultConstructor.class, "No public default constructor in " + DummyTaskWithoutDefaultConstructor.class);
+ assertTaskDefFails(DummyTaskWithoutPublicConstructor.class, "No public default constructor in " + DummyTaskWithoutPublicConstructor.class);
+
+ assertTaskDefFails(DummyTaskWithoutExecute.class, "No public execute() in " + DummyTaskWithoutExecute.class);
+ assertTaskDefFails(DummyTaskWithNonPublicExecute.class, "No public execute() in " + DummyTaskWithNonPublicExecute.class);
+
+ mbl.addBuildEvent("return type of execute() should be void but was \"int\" in " + DummyTaskWithNonVoidExecute.class, Project.MSG_WARN);
+ p.addTaskDefinition("NonVoidExecute", DummyTaskWithNonVoidExecute.class);
+ mbl.assertEmpty();
+ assertEquals(DummyTaskWithNonVoidExecute.class, p.getTaskDefinitions().get("NonVoidExecute"));
+ }
+
+ private class DummyTaskPrivate extends Task {
+ public DummyTaskPrivate() {}
+ public void execute() {}
+ }
+
+ protected class DummyTaskProtected extends Task {
+ public DummyTaskProtected() {}
+ public void execute() {}
+ }
+
+}
+
+class DummyTaskPackage extends Task {
+ public DummyTaskPackage() {}
+ public void execute() {}
}
Index: src/testcases/org/apache/tools/ant/taskdefs/TaskdefTest.java
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/TaskdefTest.java,v
retrieving revision 1.3
diff -c -u -r1.3 TaskdefTest.java
--- src/testcases/org/apache/tools/ant/taskdefs/TaskdefTest.java 2001/07/26 15:38:48 1.3
+++ src/testcases/org/apache/tools/ant/taskdefs/TaskdefTest.java 2001/10/31 15:43:14
@@ -54,6 +54,8 @@
package org.apache.tools.ant.taskdefs;
+import org.apache.tools.ant.Project;
+
/**
* @author Nico Seessle <[EMAIL PROTECTED]>
*/
@@ -84,7 +86,11 @@
}
public void test5() {
- executeTarget("test5");
+ expectBuildException("test5", "No public execute() in " + Project.class);
+ }
+
+ public void test5a() {
+ executeTarget("test5a");
}
/* disabled until I know why they fail when run via the junit task --SB
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 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 [EMAIL PROTECTED]
*
* 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
* <http://www.apache.org/>.
*/
package org.apache.tools.ant;
import java.util.Vector;
import junit.framework.Assert;
public class MockBuildListener extends Assert implements BuildListener {
private final Vector buffer = new Vector();
private final Project project;
public MockBuildListener(final Project project) {
this.project = project;
}
public void buildStarted(BuildEvent event) {}
public void buildFinished(BuildEvent event) {}
public void targetStarted(BuildEvent event) {}
public void targetFinished(BuildEvent event) {}
public void taskStarted(BuildEvent event) {}
public void taskFinished(BuildEvent event) {}
public void messageLogged(final BuildEvent actual) {
if(actual.getPriority()==Project.MSG_DEBUG)
return;
assertTrue("unexpected messageLogged: "+actual.getMessage(), !buffer.isEmpty());
assertEquals("unexpected project ", project, actual.getProject());
BuildEvent expected = (BuildEvent) buffer.remove(0);
assertEquals("unexpected messageLogged ", expected.getMessage(), actual.getMessage());
assertEquals("unexpected priority ", expected.getPriority(), actual.getPriority());
}
public void assertEmpty() {
assertTrue("MockBuilListener is not empty", buffer.isEmpty());
}
public void addBuildEvent(final String message, final int priority) {
final BuildEvent be = new BuildEvent(project);
be.setMessage(message, priority);
buffer.addElement(be);
}
}
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 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 [EMAIL PROTECTED]
*
* 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
* <http://www.apache.org/>.
*/
package org.apache.tools.ant;
import org.apache.tools.ant.Task;
public class DummyTaskWithoutPublicConstructor extends Task {
DummyTaskWithoutPublicConstructor() {
}
public void execute() {
}
}
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 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 [EMAIL PROTECTED]
*
* 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
* <http://www.apache.org/>.
*/
package org.apache.tools.ant;
public class DummyTaskWithNonVoidExecute {
public DummyTaskWithNonVoidExecute() {
}
public int execute() {
return 0;
}
}
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 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 [EMAIL PROTECTED]
*
* 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
* <http://www.apache.org/>.
*/
package org.apache.tools.ant;
public class DummyTaskWithNonPublicExecute {
public DummyTaskWithNonPublicExecute() {
}
void execute() {
}
}
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 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 [EMAIL PROTECTED]
*
* 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
* <http://www.apache.org/>.
*/
package org.apache.tools.ant;
import org.apache.tools.ant.Task;
public class DummyTaskWithoutDefaultConstructor extends Task {
public DummyTaskWithoutDefaultConstructor(int dummy) {
}
public void execute() {
}
}
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 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 [EMAIL PROTECTED]
*
* 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
* <http://www.apache.org/>.
*/
package org.apache.tools.ant;
public class DummyTaskWithoutExecute {
public DummyTaskWithoutExecute() {
}
public void execute(String dummy) {
}
}
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 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 [EMAIL PROTECTED]
*
* 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
* <http://www.apache.org/>.
*/
package org.apache.tools.ant;
public interface DummyTaskInterface {
public void execute();
}
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 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 [EMAIL PROTECTED]
*
* 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
* <http://www.apache.org/>.
*/
package org.apache.tools.ant;
import org.apache.tools.ant.Task;
public class DummyTaskOk extends Task {
public DummyTaskOk() {
}
public void execute() {
}
}
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 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 [EMAIL PROTECTED]
*
* 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
* <http://www.apache.org/>.
*/
package org.apache.tools.ant;
public class DummyTaskOkNonTask {
public DummyTaskOkNonTask() {
}
public void execute() {
}
}
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 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 [EMAIL PROTECTED]
*
* 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
* <http://www.apache.org/>.
*/
package org.apache.tools.ant;
import org.apache.tools.ant.Task;
public abstract class DummyTaskAbstract extends Task {
public DummyTaskAbstract() {
}
public void execute() {
}
public abstract void abstractDummy();
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>