git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271699 13f79535-47bb-0310-9956-ffa450edef68master
@@ -1,28 +0,0 @@ | |||||
/* | |||||
* Copyright (C) The Apache Software Foundation. All rights reserved. | |||||
* | |||||
* This software is published under the terms of the Apache Software License | |||||
* version 1.1, a copy of which has been included with this distribution in | |||||
* the LICENSE.txt file. | |||||
*/ | |||||
package org.apache.tools.ant; | |||||
import org.apache.myrmidon.api.AbstractTask; | |||||
import org.apache.myrmidon.api.TaskException; | |||||
/** | |||||
* Base class for components of a project, including tasks and data types. | |||||
* Provides common facilities. | |||||
* | |||||
* @author <a href="mailto:conor@apache.org">Conor MacNeill</a> | |||||
*/ | |||||
public abstract class ProjectComponent | |||||
extends AbstractTask | |||||
{ | |||||
public void execute() | |||||
throws TaskException | |||||
{ | |||||
//HACK: NOOP execute - should be deleted in the future! | |||||
} | |||||
} | |||||
@@ -11,10 +11,10 @@ import java.net.HttpURLConnection; | |||||
import java.net.MalformedURLException; | import java.net.MalformedURLException; | ||||
import java.net.URL; | import java.net.URL; | ||||
import java.net.URLConnection; | import java.net.URLConnection; | ||||
import org.apache.myrmidon.api.TaskException; | |||||
import org.apache.avalon.framework.logger.AbstractLogEnabled; | |||||
import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
import org.apache.myrmidon.api.TaskException; | |||||
import org.apache.myrmidon.framework.Condition; | import org.apache.myrmidon.framework.Condition; | ||||
import org.apache.tools.ant.ProjectComponent; | |||||
/** | /** | ||||
* Condition to wait for a HTTP request to succeed. Its attribute(s) are: url - | * Condition to wait for a HTTP request to succeed. Its attribute(s) are: url - | ||||
@@ -22,10 +22,10 @@ import org.apache.tools.ant.ProjectComponent; | |||||
* | * | ||||
* @author <a href="mailto:denis@network365.com">Denis Hennessy</a> | * @author <a href="mailto:denis@network365.com">Denis Hennessy</a> | ||||
* | * | ||||
* @ant:type type="condition" nam="http" | |||||
* @ant:type type="condition" name="http" | |||||
*/ | */ | ||||
public class Http | public class Http | ||||
extends ProjectComponent | |||||
extends AbstractLogEnabled | |||||
implements Condition | implements Condition | ||||
{ | { | ||||
String spec = null; | String spec = null; | ||||
@@ -8,10 +8,10 @@ | |||||
package org.apache.tools.ant.taskdefs.condition; | package org.apache.tools.ant.taskdefs.condition; | ||||
import java.io.IOException; | import java.io.IOException; | ||||
import org.apache.myrmidon.api.TaskException; | |||||
import org.apache.avalon.framework.logger.AbstractLogEnabled; | |||||
import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
import org.apache.myrmidon.api.TaskException; | |||||
import org.apache.myrmidon.framework.Condition; | import org.apache.myrmidon.framework.Condition; | ||||
import org.apache.tools.ant.ProjectComponent; | |||||
/** | /** | ||||
* Condition to wait for a TCP/IP socket to have a listener. Its attribute(s) | * Condition to wait for a TCP/IP socket to have a listener. Its attribute(s) | ||||
@@ -19,10 +19,10 @@ import org.apache.tools.ant.ProjectComponent; | |||||
* | * | ||||
* @author <a href="mailto:denis@network365.com">Denis Hennessy</a> | * @author <a href="mailto:denis@network365.com">Denis Hennessy</a> | ||||
* | * | ||||
* @ant:type type="condition" nam="socket" | |||||
* @ant:type type="condition" name="socket" | |||||
*/ | */ | ||||
public class Socket | public class Socket | ||||
extends ProjectComponent | |||||
extends AbstractLogEnabled | |||||
implements Condition | implements Condition | ||||
{ | { | ||||
String server = null; | String server = null; | ||||
@@ -8,7 +8,6 @@ | |||||
package org.apache.tools.ant.taskdefs.text; | package org.apache.tools.ant.taskdefs.text; | ||||
import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
import org.apache.tools.ant.ProjectComponent; | |||||
import org.apache.tools.ant.util.regexp.Regexp; | import org.apache.tools.ant.util.regexp.Regexp; | ||||
import org.apache.tools.ant.util.regexp.RegexpFactory; | import org.apache.tools.ant.util.regexp.RegexpFactory; | ||||
@@ -42,7 +41,6 @@ import org.apache.tools.ant.util.regexp.RegexpFactory; | |||||
* @see org.apache.tools.ant.util.regexp.Regexp | * @see org.apache.tools.ant.util.regexp.Regexp | ||||
*/ | */ | ||||
public class RegularExpression | public class RegularExpression | ||||
extends ProjectComponent | |||||
{ | { | ||||
// The regular expression factory | // The regular expression factory | ||||
private final static RegexpFactory factory = new RegexpFactory(); | private final static RegexpFactory factory = new RegexpFactory(); | ||||
@@ -7,8 +7,6 @@ | |||||
*/ | */ | ||||
package org.apache.tools.ant.taskdefs.text; | package org.apache.tools.ant.taskdefs.text; | ||||
import org.apache.tools.ant.ProjectComponent; | |||||
/** | /** | ||||
* A regular expression substitution datatype. It is an expression that is meant | * A regular expression substitution datatype. It is an expression that is meant | ||||
* to replace a regular expression. <pre> | * to replace a regular expression. <pre> | ||||
@@ -21,7 +19,6 @@ import org.apache.tools.ant.ProjectComponent; | |||||
* @see org.apache.oro.text.regex.Perl5Substitition | * @see org.apache.oro.text.regex.Perl5Substitition | ||||
*/ | */ | ||||
public class Substitution | public class Substitution | ||||
extends ProjectComponent | |||||
{ | { | ||||
private String m_expression; | private String m_expression; | ||||
@@ -11,7 +11,6 @@ import java.io.File; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.StringTokenizer; | import java.util.StringTokenizer; | ||||
import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
import org.apache.tools.ant.ProjectComponent; | |||||
/** | /** | ||||
* FileList represents an explicitly named list of files. FileLists are useful | * FileList represents an explicitly named list of files. FileLists are useful | ||||
@@ -23,7 +22,6 @@ import org.apache.tools.ant.ProjectComponent; | |||||
* @version $Revision$ $Date$ | * @version $Revision$ $Date$ | ||||
*/ | */ | ||||
public class FileList | public class FileList | ||||
extends ProjectComponent | |||||
{ | { | ||||
private final ArrayList m_filenames = new ArrayList(); | private final ArrayList m_filenames = new ArrayList(); | ||||
private File m_dir; | private File m_dir; | ||||
@@ -15,19 +15,18 @@ import java.util.Enumeration; | |||||
import java.util.Hashtable; | import java.util.Hashtable; | ||||
import java.util.Iterator; | import java.util.Iterator; | ||||
import java.util.Properties; | import java.util.Properties; | ||||
import org.apache.avalon.framework.logger.AbstractLogEnabled; | |||||
import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
import org.apache.myrmidon.framework.Filter; | import org.apache.myrmidon.framework.Filter; | ||||
import org.apache.tools.ant.ProjectComponent; | |||||
/** | /** | ||||
* A set of filters to be applied to something. A filter set may have begintoken | * A set of filters to be applied to something. A filter set may have begintoken | ||||
* and endtokens defined. | * and endtokens defined. | ||||
* | * | ||||
* @author <A href="mailto:gholam@xtra.co.nz"> Michael McCallum </A> | * @author <A href="mailto:gholam@xtra.co.nz"> Michael McCallum </A> | ||||
* @created 14 March 2001 | |||||
*/ | */ | ||||
public class FilterSet | public class FilterSet | ||||
extends ProjectComponent | |||||
extends AbstractLogEnabled | |||||
implements Cloneable | implements Cloneable | ||||
{ | { | ||||
/** | /** | ||||
@@ -10,7 +10,6 @@ package org.apache.tools.ant.util.mappers; | |||||
import java.net.URL; | import java.net.URL; | ||||
import java.net.URLClassLoader; | import java.net.URLClassLoader; | ||||
import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
import org.apache.tools.ant.ProjectComponent; | |||||
import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
import org.apache.tools.ant.types.PathUtil; | import org.apache.tools.ant.types.PathUtil; | ||||
@@ -20,8 +19,6 @@ import org.apache.tools.ant.types.PathUtil; | |||||
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a> | * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a> | ||||
*/ | */ | ||||
public class Mapper | public class Mapper | ||||
extends ProjectComponent | |||||
implements Cloneable | |||||
{ | { | ||||
private MapperType m_type; | private MapperType m_type; | ||||
private String m_classname; | private String m_classname; | ||||
@@ -22,8 +22,8 @@ import org.apache.myrmidon.LogMessageTracker; | |||||
public class IfTest | public class IfTest | ||||
extends AbstractProjectTest | extends AbstractProjectTest | ||||
{ | { | ||||
private final static Resources REZ | |||||
= ResourceManager.getPackageResources( IfTest.class ); | |||||
private final static Resources REZ = | |||||
ResourceManager.getPackageResources( IfTest.class ); | |||||
public IfTest( String name ) | public IfTest( String name ) | ||||
{ | { | ||||
@@ -22,8 +22,8 @@ import org.apache.myrmidon.LogMessageTracker; | |||||
public class IfTest | public class IfTest | ||||
extends AbstractProjectTest | extends AbstractProjectTest | ||||
{ | { | ||||
private final static Resources REZ | |||||
= ResourceManager.getPackageResources( IfTest.class ); | |||||
private final static Resources REZ = | |||||
ResourceManager.getPackageResources( IfTest.class ); | |||||
public IfTest( String name ) | public IfTest( String name ) | ||||
{ | { | ||||
@@ -1,28 +0,0 @@ | |||||
/* | |||||
* Copyright (C) The Apache Software Foundation. All rights reserved. | |||||
* | |||||
* This software is published under the terms of the Apache Software License | |||||
* version 1.1, a copy of which has been included with this distribution in | |||||
* the LICENSE.txt file. | |||||
*/ | |||||
package org.apache.tools.ant; | |||||
import org.apache.myrmidon.api.AbstractTask; | |||||
import org.apache.myrmidon.api.TaskException; | |||||
/** | |||||
* Base class for components of a project, including tasks and data types. | |||||
* Provides common facilities. | |||||
* | |||||
* @author <a href="mailto:conor@apache.org">Conor MacNeill</a> | |||||
*/ | |||||
public abstract class ProjectComponent | |||||
extends AbstractTask | |||||
{ | |||||
public void execute() | |||||
throws TaskException | |||||
{ | |||||
//HACK: NOOP execute - should be deleted in the future! | |||||
} | |||||
} | |||||
@@ -11,10 +11,10 @@ import java.net.HttpURLConnection; | |||||
import java.net.MalformedURLException; | import java.net.MalformedURLException; | ||||
import java.net.URL; | import java.net.URL; | ||||
import java.net.URLConnection; | import java.net.URLConnection; | ||||
import org.apache.myrmidon.api.TaskException; | |||||
import org.apache.avalon.framework.logger.AbstractLogEnabled; | |||||
import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
import org.apache.myrmidon.api.TaskException; | |||||
import org.apache.myrmidon.framework.Condition; | import org.apache.myrmidon.framework.Condition; | ||||
import org.apache.tools.ant.ProjectComponent; | |||||
/** | /** | ||||
* Condition to wait for a HTTP request to succeed. Its attribute(s) are: url - | * Condition to wait for a HTTP request to succeed. Its attribute(s) are: url - | ||||
@@ -22,10 +22,10 @@ import org.apache.tools.ant.ProjectComponent; | |||||
* | * | ||||
* @author <a href="mailto:denis@network365.com">Denis Hennessy</a> | * @author <a href="mailto:denis@network365.com">Denis Hennessy</a> | ||||
* | * | ||||
* @ant:type type="condition" nam="http" | |||||
* @ant:type type="condition" name="http" | |||||
*/ | */ | ||||
public class Http | public class Http | ||||
extends ProjectComponent | |||||
extends AbstractLogEnabled | |||||
implements Condition | implements Condition | ||||
{ | { | ||||
String spec = null; | String spec = null; | ||||
@@ -8,10 +8,10 @@ | |||||
package org.apache.tools.ant.taskdefs.condition; | package org.apache.tools.ant.taskdefs.condition; | ||||
import java.io.IOException; | import java.io.IOException; | ||||
import org.apache.myrmidon.api.TaskException; | |||||
import org.apache.avalon.framework.logger.AbstractLogEnabled; | |||||
import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
import org.apache.myrmidon.api.TaskException; | |||||
import org.apache.myrmidon.framework.Condition; | import org.apache.myrmidon.framework.Condition; | ||||
import org.apache.tools.ant.ProjectComponent; | |||||
/** | /** | ||||
* Condition to wait for a TCP/IP socket to have a listener. Its attribute(s) | * Condition to wait for a TCP/IP socket to have a listener. Its attribute(s) | ||||
@@ -19,10 +19,10 @@ import org.apache.tools.ant.ProjectComponent; | |||||
* | * | ||||
* @author <a href="mailto:denis@network365.com">Denis Hennessy</a> | * @author <a href="mailto:denis@network365.com">Denis Hennessy</a> | ||||
* | * | ||||
* @ant:type type="condition" nam="socket" | |||||
* @ant:type type="condition" name="socket" | |||||
*/ | */ | ||||
public class Socket | public class Socket | ||||
extends ProjectComponent | |||||
extends AbstractLogEnabled | |||||
implements Condition | implements Condition | ||||
{ | { | ||||
String server = null; | String server = null; | ||||
@@ -8,7 +8,6 @@ | |||||
package org.apache.tools.ant.taskdefs.text; | package org.apache.tools.ant.taskdefs.text; | ||||
import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
import org.apache.tools.ant.ProjectComponent; | |||||
import org.apache.tools.ant.util.regexp.Regexp; | import org.apache.tools.ant.util.regexp.Regexp; | ||||
import org.apache.tools.ant.util.regexp.RegexpFactory; | import org.apache.tools.ant.util.regexp.RegexpFactory; | ||||
@@ -42,7 +41,6 @@ import org.apache.tools.ant.util.regexp.RegexpFactory; | |||||
* @see org.apache.tools.ant.util.regexp.Regexp | * @see org.apache.tools.ant.util.regexp.Regexp | ||||
*/ | */ | ||||
public class RegularExpression | public class RegularExpression | ||||
extends ProjectComponent | |||||
{ | { | ||||
// The regular expression factory | // The regular expression factory | ||||
private final static RegexpFactory factory = new RegexpFactory(); | private final static RegexpFactory factory = new RegexpFactory(); | ||||
@@ -7,8 +7,6 @@ | |||||
*/ | */ | ||||
package org.apache.tools.ant.taskdefs.text; | package org.apache.tools.ant.taskdefs.text; | ||||
import org.apache.tools.ant.ProjectComponent; | |||||
/** | /** | ||||
* A regular expression substitution datatype. It is an expression that is meant | * A regular expression substitution datatype. It is an expression that is meant | ||||
* to replace a regular expression. <pre> | * to replace a regular expression. <pre> | ||||
@@ -21,7 +19,6 @@ import org.apache.tools.ant.ProjectComponent; | |||||
* @see org.apache.oro.text.regex.Perl5Substitition | * @see org.apache.oro.text.regex.Perl5Substitition | ||||
*/ | */ | ||||
public class Substitution | public class Substitution | ||||
extends ProjectComponent | |||||
{ | { | ||||
private String m_expression; | private String m_expression; | ||||
@@ -11,7 +11,6 @@ import java.io.File; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.StringTokenizer; | import java.util.StringTokenizer; | ||||
import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
import org.apache.tools.ant.ProjectComponent; | |||||
/** | /** | ||||
* FileList represents an explicitly named list of files. FileLists are useful | * FileList represents an explicitly named list of files. FileLists are useful | ||||
@@ -23,7 +22,6 @@ import org.apache.tools.ant.ProjectComponent; | |||||
* @version $Revision$ $Date$ | * @version $Revision$ $Date$ | ||||
*/ | */ | ||||
public class FileList | public class FileList | ||||
extends ProjectComponent | |||||
{ | { | ||||
private final ArrayList m_filenames = new ArrayList(); | private final ArrayList m_filenames = new ArrayList(); | ||||
private File m_dir; | private File m_dir; | ||||
@@ -15,19 +15,18 @@ import java.util.Enumeration; | |||||
import java.util.Hashtable; | import java.util.Hashtable; | ||||
import java.util.Iterator; | import java.util.Iterator; | ||||
import java.util.Properties; | import java.util.Properties; | ||||
import org.apache.avalon.framework.logger.AbstractLogEnabled; | |||||
import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
import org.apache.myrmidon.framework.Filter; | import org.apache.myrmidon.framework.Filter; | ||||
import org.apache.tools.ant.ProjectComponent; | |||||
/** | /** | ||||
* A set of filters to be applied to something. A filter set may have begintoken | * A set of filters to be applied to something. A filter set may have begintoken | ||||
* and endtokens defined. | * and endtokens defined. | ||||
* | * | ||||
* @author <A href="mailto:gholam@xtra.co.nz"> Michael McCallum </A> | * @author <A href="mailto:gholam@xtra.co.nz"> Michael McCallum </A> | ||||
* @created 14 March 2001 | |||||
*/ | */ | ||||
public class FilterSet | public class FilterSet | ||||
extends ProjectComponent | |||||
extends AbstractLogEnabled | |||||
implements Cloneable | implements Cloneable | ||||
{ | { | ||||
/** | /** | ||||
@@ -10,7 +10,6 @@ package org.apache.tools.ant.util.mappers; | |||||
import java.net.URL; | import java.net.URL; | ||||
import java.net.URLClassLoader; | import java.net.URLClassLoader; | ||||
import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
import org.apache.tools.ant.ProjectComponent; | |||||
import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
import org.apache.tools.ant.types.PathUtil; | import org.apache.tools.ant.types.PathUtil; | ||||
@@ -20,8 +19,6 @@ import org.apache.tools.ant.types.PathUtil; | |||||
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a> | * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a> | ||||
*/ | */ | ||||
public class Mapper | public class Mapper | ||||
extends ProjectComponent | |||||
implements Cloneable | |||||
{ | { | ||||
private MapperType m_type; | private MapperType m_type; | ||||
private String m_classname; | private String m_classname; | ||||