diff --git a/proposal/myrmidon/src/ant1compat/ant-descriptor.xml b/proposal/myrmidon/src/ant1compat/ant-descriptor.xml
deleted file mode 100644
index 7ac0d2309..000000000
--- a/proposal/myrmidon/src/ant1compat/ant-descriptor.xml
+++ /dev/null
@@ -1,314 +0,0 @@
-null
.
- * @param msgLevel The priority level to log at.
- */
- public void log( String msg, int msgLevel )
- {
-
- doLog( msg, msgLevel );
- super.log( msg, msgLevel );
- }
-
- /**
- * Writes a task level message to the log with the given log level.
- * @param task The task to use in the log. Must not be null
.
- * @param msg The text to log. Should not be null
.
- * @param msgLevel The priority level to log at.
- */
- public void log( Task task, String msg, int msgLevel )
- {
- doLog( msg, msgLevel );
- super.log( task, msg, msgLevel );
- }
-
- /**
- * Writes a target level message to the log with the given log level.
- * @param target The target to use in the log.
- * Must not be null
.
- * @param msg The text to log. Should not be null
.
- * @param msgLevel The priority level to log at.
- */
- public void log( Target target, String msg, int msgLevel )
- {
- doLog( msg, msgLevel );
- super.log( target, msg, msgLevel );
- }
-
- private void doLog( String msg, int msgLevel )
- {
- switch( msgLevel )
- {
- case Ant1CompatProject.MSG_ERR:
- m_context.error( msg );
- break;
- case Ant1CompatProject.MSG_WARN:
- m_context.warn( msg );
- break;
- case Ant1CompatProject.MSG_INFO:
- m_context.info( msg );
- break;
- case Ant1CompatProject.MSG_VERBOSE:
- m_context.verbose( msg );
- break;
- case Ant1CompatProject.MSG_DEBUG:
- m_context.debug( msg );
- }
- }
-
- /**
- * This is a copy of init() from the Ant1 Project, which adds Ant1 tasks and
- * DataTypes to the underlying Ant1 Project, but calling add methods on the
- * superclass to avoid adding everything to the TypeManager.
- *
- * @exception BuildException if the default task list cannot be loaded
- */
- public void init() throws BuildException
- {
- setJavaVersionProperty();
-
- String defs = "/org/apache/tools/ant/taskdefs/defaults.properties";
-
- try
- {
- Properties props = new Properties();
- InputStream in = this.getClass().getResourceAsStream( defs );
- if( in == null )
- {
- throw new BuildException( "Can't load default task list" );
- }
- props.load( in );
- in.close();
-
- Enumeration enum = props.propertyNames();
- while( enum.hasMoreElements() )
- {
- String key = (String)enum.nextElement();
- String value = props.getProperty( key );
- try
- {
- Class taskClass = Class.forName( value );
-
- // NOTE: Line modified from Ant1 Project.
- super.addTaskDefinition( key, taskClass );
-
- }
- catch( NoClassDefFoundError ncdfe )
- {
- log( "Could not load a dependent class ("
- + ncdfe.getMessage() + ") for task " + key, MSG_DEBUG );
- }
- catch( ClassNotFoundException cnfe )
- {
- log( "Could not load class (" + value
- + ") for task " + key, MSG_DEBUG );
- }
- }
- }
- catch( IOException ioe )
- {
- throw new BuildException( "Can't load default task list" );
- }
-
- String dataDefs = "/org/apache/tools/ant/types/defaults.properties";
-
- try
- {
- Properties props = new Properties();
- InputStream in = this.getClass().getResourceAsStream( dataDefs );
- if( in == null )
- {
- throw new BuildException( "Can't load default datatype list" );
- }
- props.load( in );
- in.close();
-
- Enumeration enum = props.propertyNames();
- while( enum.hasMoreElements() )
- {
- String key = (String)enum.nextElement();
- String value = props.getProperty( key );
- try
- {
- Class dataClass = Class.forName( value );
-
- // NOTE: Line modified from Ant1 Project.
- super.addDataTypeDefinition( key, dataClass );
-
- }
- catch( NoClassDefFoundError ncdfe )
- {
- // ignore...
- }
- catch( ClassNotFoundException cnfe )
- {
- // ignore...
- }
- }
- }
- catch( IOException ioe )
- {
- throw new BuildException( "Can't load default datatype list" );
- }
-
- setSystemProperties();
- }
-
- /**
- * Adds a new task definition to the project, registering it with the
- * TypeManager, as well as the underlying Ant1 Project.
- *
- * @param taskName The name of the task to add.
- * Must not be null
.
- * @param taskClass The full name of the class implementing the task.
- * Must not be null
.
- *
- * @exception BuildException if the class is unsuitable for being an Ant
- * task. An error level message is logged before
- * this exception is thrown.
- *
- * @see #checkTaskClass(Class)
- */
- public void addTaskDefinition( String taskName, Class taskClass )
- throws BuildException
- {
- String ant2name = ANT1_TASK_PREFIX + taskName;
- try
- {
- registerType( org.apache.myrmidon.api.Task.ROLE, ant2name, taskClass );
- }
- catch( Exception e )
- {
- throw new BuildException( e );
- }
-
- super.addTaskDefinition( taskName, taskClass );
- }
-
- /**
- * Utility method to register a type.
- */
- protected void registerType( final String roleType,
- final String typeName,
- final Class type )
- throws Exception
- {
- final ClassLoader loader = type.getClassLoader();
- final DefaultTypeFactory factory = new DefaultTypeFactory( loader );
- factory.addNameClassMapping( typeName, type.getName() );
-
- TypeManager typeManager = (TypeManager)m_context.getService( TypeManager.class );
- typeManager.registerType( roleType, typeName, factory );
- }
-
- /**
- * Sets a property. Any existing property of the same name
- * is overwritten, unless it is a user property.
- * @param name The name of property to set.
- * Must not be null
.
- * @param value The new value of the property.
- * Must not be null
.
- */
- public void setProperty( String name, String value )
- {
- if( m_userProperties.contains( name ) )
- {
- log( "Override ignored for user property " + name, MSG_VERBOSE );
- return;
- }
-
- if( null != m_context.getProperty( name ) )
- {
- log( "Overriding previous definition of property " + name,
- MSG_VERBOSE );
- }
-
- log( "Setting project property: " + name + " -> " +
- value, MSG_DEBUG );
- doSetProperty( name, value );
- }
-
- /**
- * Sets a property if no value currently exists. If the property
- * exists already, a message is logged and the method returns with
- * no other effect.
- *
- * @param name The name of property to set.
- * Must not be null
.
- * @param value The new value of the property.
- * Must not be null
.
- * @since 1.5
- */
- public void setNewProperty( String name, String value )
- {
- if( null != m_context.getProperty( name ) )
- {
- log( "Override ignored for property " + name, MSG_VERBOSE );
- return;
- }
-
- log( "Setting project property: " + name + " -> " +
- value, MSG_DEBUG );
- doSetProperty( name, value );
- }
-
- /**
- * Sets a user property, which cannot be overwritten by
- * set/unset property calls. Any previous value is overwritten.
- * @param name The name of property to set.
- * Must not be null
.
- * @param value The new value of the property.
- * Must not be null
.
- * @see #setProperty(String,String)
- */
- public void setUserProperty( String name, String value )
- {
- log( "Setting ro project property: " + name + " -> " +
- value, MSG_DEBUG );
- m_userProperties.add( name );
- doSetProperty( name, value );
- }
-
- /**
- * Sets a property value in the underlying context, wrapping exceptions as
- * Ant1 BuildExceptions.
- * @param name property name
- * @param value property value
- */
- private void doSetProperty( String name, String value )
- {
- try
- {
- m_underlyingContext.setProperty( name, value );
- }
- catch( TaskException e )
- {
- throw new BuildException( "Could not set property: " + name, e );
- }
- }
-
- /**
- * Returns the value of a property, if it is set.
- *
- * @param name The name of the property.
- * May be null
, in which case
- * the return value is also null
.
- * @return the property value, or null
for no match
- * or if a null
name is provided.
- */
- public String getProperty( String name )
- {
- Object value = m_context.getProperty( name );
-
- if( value == null )
- {
- return null;
- }
- else if( value instanceof String )
- {
- return (String)value;
- }
- else
- {
- try
- {
- return (String)m_converter.convert( String.class, value, m_context );
- }
- catch( ConverterException e )
- {
- throw new BuildException( e );
- }
- }
- }
-
- /**
- * Returns the value of a user property, if it is set.
- *
- * @param name The name of the property.
- * May be null
, in which case
- * the return value is also null
.
- * @return the property value, or null
for no match
- * or if a null
name is provided.
- */
- public String getUserProperty( String name )
- {
- if( m_userProperties.contains( name ) )
- {
- return getProperty( name );
- }
- else
- {
- return null;
- }
- }
-
- /**
- * Returns a copy of the properties table.
- * @return a hashtable containing all properties
- * (including user properties).
- */
- public Hashtable getProperties()
- {
- final Hashtable propsCopy = new Hashtable();
-
- final Map contextProps;
- try
- {
- contextProps = m_context.getProperties();
- }
- catch( final TaskException e )
- {
- throw new BuildException( e );
- }
- final Iterator propNames = contextProps.keySet().iterator();
- while( propNames.hasNext() )
- {
- final String name = (String)propNames.next();
- final String value = getProperty( name );
- if( value != null )
- {
- propsCopy.put( name, value );
- }
- }
-
- return propsCopy;
- }
-
- /**
- * Returns a copy of the user property hashtable
- * @return a hashtable containing just the user properties
- */
- public Hashtable getUserProperties()
- {
- Hashtable propsCopy = new Hashtable();
-
- Iterator userPropNames = m_userProperties.iterator();
- while( userPropNames.hasNext() )
- {
- String name = (String)userPropNames.next();
- String value = getProperty( name );
- propsCopy.put( name, value );
- }
-
- return propsCopy;
- }
-
- /**
- * Replaces ${} style constructions in the given value with the
- * string value of the corresponding data types.
- *
- * @param value The string to be scanned for property references.
- * May be null
.
- *
- * @return the given string with embedded property names replaced
- * by values, or null
if the given string is
- * null
.
- *
- * @exception BuildException if the given value has an unclosed
- * property name, e.g. ${xxx
- */
- public String replaceProperties( String value )
- throws BuildException
- {
- return ProjectHelper.replaceProperties( this, value,
- this.getProperties() );
- }
-
- /**
- * Make the Ant1 project set the java version property, and then
- * copy it into the context properties.
- *
- * @exception BuildException if this Java version is not supported
- *
- * @see #getJavaVersion()
- */
- public void setJavaVersionProperty() throws BuildException
- {
- String javaVersion = getJavaVersion();
- doSetProperty( "ant.java.version", javaVersion );
-
- log( "Detected Java version: " + javaVersion + " in: "
- + System.getProperty( "java.home" ), MSG_VERBOSE );
-
- log( "Detected OS: " + System.getProperty( "os.name" ), MSG_VERBOSE );
- }
-
- /**
- * Sets the base directory for the project, checking that
- * the given filename exists and is a directory.
- *
- * @param baseD The project base directory.
- * Must not be null
.
- *
- * @exception BuildException if the directory if invalid
- */
- public void setBaseDir( File baseD ) throws BuildException
- {
- super.setBaseDir( baseD );
- doSetProperty( "basedir", super.getProperty( "basedir" ) );
- }
-
-}
diff --git a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Ant1CompatTaskAdapter.java b/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Ant1CompatTaskAdapter.java
deleted file mode 100644
index 1ea70aed7..000000000
--- a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Ant1CompatTaskAdapter.java
+++ /dev/null
@@ -1,66 +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.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.excalibur.i18n.Resources;
-import org.apache.avalon.excalibur.i18n.ResourceManager;
-
-/**
- * An adapter for running (in Myrmidon) Ant1 tasks which do not extend Task
- *
- * @author Darrell DeBoer
- * @version $Revision$ $Date$
- */
-public class Ant1CompatTaskAdapter
- extends TaskAdapter
-{
- private static final Resources REZ =
- ResourceManager.getPackageResources( Ant1CompatTaskAdapter.class );
-
- /**
- * Gets the adapted task name from the configuration, and looks up the
- * Class for the adapted task. The adapted task is then instantiated and
- * configured.
- * @param configuration The Task Model
- * @throws ConfigurationException If the configuration is invalid.
- */
- public void configure( Configuration configuration )
- throws ConfigurationException
- {
- // Create a new instance of the proxy object,
- // and configure it.
- String taskName = getAnt1Name( configuration.getName() );
-
- Class taskClass = (Class)project.getTaskDefinitions().get( taskName );
-
- if( taskClass == null )
- {
- String message =
- REZ.getString( "taskadapter.invalid-task-name.error", taskName );
- throw new ConfigurationException( message );
- }
-
- Object adaptedTask = null;
- try
- {
- adaptedTask = taskClass.newInstance();
- }
- catch( Exception e )
- {
- String message =
- REZ.getString( "taskadapter.no-create.error", taskClass.getName() );
- throw new ConfigurationException( message );
- }
-
- configure( adaptedTask, configuration );
-
- setProxy( adaptedTask );
- }
-}
diff --git a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Ant1CompatTypeInstanceTask.java b/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Ant1CompatTypeInstanceTask.java
deleted file mode 100644
index e5fef81e9..000000000
--- a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Ant1CompatTypeInstanceTask.java
+++ /dev/null
@@ -1,50 +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.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.excalibur.i18n.ResourceManager;
-import org.apache.avalon.excalibur.i18n.Resources;
-
-/**
- * A task for instantiating Ant1 datatypes.
- *
- * @author Darrell DeBoer
- * @version $Revision$ $Date$
- */
-public class Ant1CompatTypeInstanceTask
- extends Task
-{
- private static final Resources REZ =
- ResourceManager.getPackageResources( Ant1CompatTypeInstanceTask.class );
-
- public void configure( Configuration configuration ) throws ConfigurationException
- {
- if( configuration.getAttribute( "id", null ) == null )
- {
- final String message = REZ.getString( "type.no-id.error" );
- throw new ConfigurationException( message );
- }
-
- String typeName = configuration.getName();
- Object datatype = project.createDataType( getAnt1Name( typeName ) );
-
- // Configure the datatype. The type is added to the project
- // as a reference during configuration.
- configure( datatype, configuration );
- }
-
- /**
- * Execute task. Don't do anything.
- */
- public void execute()
- {
- // Everything is done during configuration.
- }
-}
diff --git a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/BuildException.java b/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/BuildException.java
deleted file mode 100644
index c3f0a5423..000000000
--- a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/BuildException.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000-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
- * null
.
- */
- public BuildException(final String msg) {
- super(msg);
- }
-
- /**
- * Constructs an exception with the given message and exception as
- * a root cause.
- *
- * @param msg A description of or information about the exception.
- * Should not be null
unless a cause is specified.
- * @param cause The exception that might have caused this one.
- * May be null
.
- */
- public BuildException(final String msg, final Throwable cause) {
- super(msg);
- m_cause = cause;
- }
-
- /**
- * Constructs an exception with the given message and exception as
- * a root cause and a location in a file.
- *
- * @param msg A description of or information about the exception.
- * Should not be null
unless a cause is specified.
- * @param cause The exception that might have caused this one.
- * May be null
.
- * @param location The location in the project file where the error
- * occurred. Must not be null
.
- */
- public BuildException( final String msg,
- final Throwable cause,
- final Location location) {
- this(msg, cause);
- m_location = location;
- }
-
- /**
- * Constructs an exception with the given exception as a root cause.
- *
- * @param cause The exception that might have caused this one.
- * Should not be null
.
- */
- public BuildException(final Throwable cause ) {
- this(cause.getMessage(), cause);
- }
-
- /**
- * Constructs an exception with the given descriptive message and a
- * location in a file.
- *
- * @param msg A description of or information about the exception.
- * Should not be null
.
- * @param location The location in the project file where the error
- * occurred. Must not be null
.
- */
- public BuildException(final String msg, final Location location) {
- super(msg);
- m_location = location;
- }
-
- /**
- * Constructs an exception with the given exception as
- * a root cause and a location in a file.
- *
- * @param cause The exception that might have caused this one.
- * Should not be null
.
- * @param location The location in the project file where the error
- * occurred. Must not be null
.
- */
- public BuildException(final Throwable cause, final Location location) {
- this(cause);
- m_location = location;
- }
-
- /**
- * Returns the nested exception, if any.
- *
- * @return the nested exception, or null
if no
- * exception is associated with this one
- */
- public Throwable getException() {
- return m_cause;
- }
-
- /**
- * Returns the location of the error and the error message.
- *
- * @return the location of the error and the error message
- */
- public String toString() {
- return m_location.toString() + getMessage();
- }
-
- /**
- * Sets the file location where the error occurred.
- *
- * @param location The file location where the error occurred.
- * Must not be null
.
- */
- public void setLocation(final Location location) {
- m_location = location;
- }
-
- /**
- * Returns the file location where the error occurred.
- *
- * @return the file location where the error occurred.
- */
- public Location getLocation() {
- return m_location;
- }
-
- /**
- * Prints the stack trace for this exception and any
- * nested exception to System.err
.
- */
- public void printStackTrace() {
- printStackTrace(System.err);
- }
-
- /**
- * Prints the stack trace of this exception and any nested
- * exception to the specified PrintStream.
- *
- * @param ps The PrintStream to print the stack trace to.
- * Must not be null
.
- */
- public void printStackTrace(PrintStream ps) {
- synchronized (ps) {
- super.printStackTrace(ps);
- if (m_cause != null) {
- ps.println("--- Nested Exception ---");
- m_cause.printStackTrace(ps);
- }
- }
- }
-
- /**
- * Prints the stack trace of this exception and any nested
- * exception to the specified PrintWriter.
- *
- * @param pw The PrintWriter to print the stack trace to.
- * Must not be null
.
- */
- public void printStackTrace(PrintWriter pw) {
- synchronized (pw) {
- super.printStackTrace(pw);
- if (m_cause != null) {
- pw.println("--- Nested Exception ---");
- m_cause.printStackTrace(pw);
- }
- }
- }
-
- /**
- * Myrmidon-friendly cascading exception method.
- * @return the cascading cause of this exception.
- */
- public Throwable getCause()
- {
- return m_cause;
- }
-}
diff --git a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/LoaderUtils.java b/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/LoaderUtils.java
deleted file mode 100644
index 0b8c46648..000000000
--- a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/LoaderUtils.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * 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
- * null
, indicating a top-level task.
- */
- public void setOwningTarget(Target target) {
- this.target = target;
- }
-
- /**
- * Returns the container target of this task.
- *
- * @return The target containing this task, or null
if
- * this task is a top-level task.
- */
- public Target getOwningTarget() {
- return target;
- }
-
- /**
- * Sets the name to use in logging messages.
- *
- * @param name The name to use in logging messages.
- * Should not be null
.
- */
- public void setTaskName(String name) {
- this.taskName = name;
- }
-
- /**
- * Returns the name to use in logging messages.
- *
- * @return the name to use in logging messages.
- */
- public String getTaskName() {
- return taskName;
- }
-
- /**
- * Sets the name with which the task has been invoked.
- *
- * @param type The name the task has been invoked as.
- * Should not be null
.
- */
- void setTaskType(String type) {
- this.taskType = type;
- }
-
- /**
- * Sets a description of the current action. This may be used for logging
- * purposes.
- *
- * @param desc Description of the current action.
- * May be null
, indicating that no description is
- * available.
- *
- */
- public void setDescription( String desc ) {
- description = desc;
- }
-
- /**
- * Returns the description of the current action.
- *
- * @return the description of the current action, or null
if
- * no description is available.
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * Called by the project to let the task initialize properly.
- * The default implementation is a no-op.
- *
- * @exception BuildException if someting goes wrong with the build
- */
- public void init() throws BuildException {}
-
- /**
- * Called by the project to let the task do its work. This method may be
- * called more than once, if the task is invoked more than once.
- * For example,
- * if target1 and target2 both depend on target3, then running
- * "ant target1 target2" will run all tasks in target3 twice.
- *
- * @exception BuildException if something goes wrong with the build
- */
- public void execute() throws BuildException {}
-
- /**
- * Returns the file/location where this task was defined.
- *
- * @return the file/location where this task was defined.
- * Should not return null
. Location.UNKNOWN_LOCATION
- * is used for unknown locations.
- *
- * @see Location#UNKNOWN_LOCATION
- */
- public Location getLocation() {
- return location;
- }
-
- /**
- * Sets the file/location where this task was defined.
- *
- * @param location The file/location where this task was defined.
- * Should not be null
- use
- * Location.UNKNOWN_LOCATION if the location isn't known.
- *
- * @see Location#UNKNOWN_LOCATION
- */
- public void setLocation(Location location) {
- this.location = location;
- }
-
- /**
- * Returns the wrapper used for runtime configuration.
- *
- * @return the wrapper used for runtime configuration. This
- * method will generate a new wrapper (and cache it)
- * if one isn't set already.
- */
- public RuntimeConfigurable getRuntimeConfigurableWrapper() {
- if (wrapper == null) {
- wrapper = new RuntimeConfigurable(this, getTaskName());
- }
- return wrapper;
- }
-
- /**
- * Sets the wrapper to be used for runtime configuration.
- *
- * @param wrapper The wrapper to be used for runtime configuration.
- * May be null
, in which case the next call
- * to getRuntimeConfigurableWrapper will generate a new
- * wrapper.
- */
- protected void setRuntimeConfigurableWrapper(RuntimeConfigurable wrapper) {
- this.wrapper = wrapper;
- }
-
- // XXX: (Jon Skeet) The comment "if it hasn't been done already" may
- // not be strictly true. wrapper.maybeConfigure() won't configure the same
- // attributes/text more than once, but it may well add the children again,
- // unless I've missed something.
- /**
- * Configures this task - if it hasn't been done already.
- * If the task has been invalidated, it is replaced with an
- * UnknownElement task which uses the new definition in the project.
- *
- * @exception BuildException if the task cannot be configured.
- */
- public void maybeConfigure() throws BuildException {
- if (!invalid) {
- if (wrapper != null) {
- wrapper.maybeConfigure(project);
- }
- } else {
- getReplacement();
- }
- }
-
- /**
- * Handles a line of output by logging it with the INFO priority.
- *
- * @param line The line of output to log. Should not be null
.
- */
- protected void handleOutput(String line) {
- log(line, Project.MSG_INFO);
- }
-
- /**
- * Handles an error line by logging it with the INFO priority.
- *
- * @param line The error line to log. Should not be null
.
- */
- protected void handleErrorOutput(String line) {
- log(line, Project.MSG_ERR);
- }
-
- /**
- * Logs a message with the default (INFO) priority.
- *
- * @param msg The message to be logged. Should not be null
.
- */
- public void log(String msg) {
- log(msg, Project.MSG_INFO);
- }
-
- /**
- * Logs a mesage with the given priority. This delegates
- * the actual logging to the project.
- *
- * @param msg The message to be logged. Should not be null
.
- * @param msgLevel The message priority at which this message is to
- * be logged.
- */
- public void log(String msg, int msgLevel) {
- project.log(getThis(), msg, msgLevel);
- }
-
- /**
- * Performs this task if it's still valid, or gets a replacement
- * version and performs that otherwise.
- *
- * Performing a task consists of firing a task started event,
- * configuring the task, executing it, and then firing task finished
- * event. If a runtime exception is thrown, the task finished event
- * is still fired, but with the exception as the cause.
- */
- public final void perform() {
- if (!invalid) {
- try {
- project.fireTaskStarted(getThis());
- maybeConfigure();
- execute();
- project.fireTaskFinished(getThis(), null);
- }
- catch (RuntimeException exc) {
- if (exc instanceof BuildException) {
- BuildException be = (BuildException) exc;
- if (be.getLocation() == Location.UNKNOWN_LOCATION) {
- be.setLocation(getLocation());
- }
- }
- project.fireTaskFinished(getThis(), exc);
- throw exc;
- }
- } else {
- UnknownElement ue = getReplacement();
- Task task = ue.getTask();
- task.perform();
- }
- }
-
- /**
- * Marks this task as invalid. Any further use of this task
- * will go through a replacement with the updated definition.
- */
- final void markInvalid() {
- invalid = true;
- }
-
- /**
- * Replacement element used if this task is invalidated.
- */
- private UnknownElement replacement;
-
- /**
- * Creates an UnknownElement that can be used to replace this task.
- * Once this has been created once, it is cached and returned by
- * future calls.
- *
- * @return the UnknownElement instance for the new definition of this task.
- */
- private UnknownElement getReplacement() {
- if (replacement == null) {
- replacement = new UnknownElement(taskType);
- replacement.setProject(project);
- replacement.setTaskType(taskType);
- replacement.setTaskName(taskName);
- replacement.setLocation(location);
- replacement.setOwningTarget(target);
- replacement.setRuntimeConfigurableWrapper(wrapper);
- wrapper.setProxy(replacement);
- target.replaceChild(getThis(), replacement);
- replacement.maybeConfigure();
- }
- return replacement;
- }
-
- private Task getThis()
- {
- return (Task) this;
- }
-
-}
diff --git a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Resources.properties b/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Resources.properties
deleted file mode 100644
index 8b1a514db..000000000
--- a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Resources.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-type.no-id.error=Id must be specified.
-
-taskadapter.invalid-task-name.error=Invalid task name for TaskAdapter: {0}.
-taskadapter.no-create.error=Could not instantiate adapted task: {0}.
diff --git a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Task.java b/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Task.java
deleted file mode 100644
index e0e5b99a5..000000000
--- a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Task.java
+++ /dev/null
@@ -1,117 +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 java.util.Locale;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.myrmidon.api.TaskContext;
-import org.apache.myrmidon.api.TaskException;
-
-/**
- * Ant1 Task proxy for Myrmidon.
- * Note that this class and OriginalAnt1Task (superclass) comprise a single logical
- * class, but the code is kept separate for ease of development. OriginalAnt1Task
- * is barely modified from the Ant1 original, whereas this class contains
- * all of the Myrmidon-specific adaptations.
- *
- * @author Darrell DeBoer
- * @version $Revision$ $Date$
- */
-public class Task extends OriginalAnt1Task
- implements org.apache.myrmidon.api.Task, Configurable
-{
- protected TaskContext m_context;
-
- /**
- * Specify the context in which the task operates in.
- * The Task will use the TaskContext to receive information
- * about it's environment.
- */
- public void contextualize( TaskContext context )
- throws TaskException
- {
- m_context = context;
-
- this.setTaskType( context.getName() );
- this.setTaskName( context.getName() );
-
- // Create/recontextualise the Ant1 Project.
- Ant1CompatProject project =
- (Ant1CompatProject)context.getProperty( Ant1CompatProject.ANT1_PROJECT_PROP );
- if( project == null )
- {
- project = createProject();
- m_context.setProperty( Ant1CompatProject.ANT1_PROJECT_PROP, project );
- }
- else
- {
- project.recontextulize( context );
- }
-
- this.setProject( project );
- }
-
- /**
- * Create and initialise an Ant1CompatProject
- */
- private Ant1CompatProject createProject()
- throws TaskException
- {
- Ant1CompatProject project = new Ant1CompatProject( m_context );
- project.init();
- return project;
- }
-
- /**
- * Uses the task Configuration to perform Ant1-style configuration
- * on the Ant1 task. This method configures *all* tasks the way Ant1
- * configures tasks inside a target.
- *
- * @param configuration The TaskModel for this Ant1 Task.
- * @throws ConfigurationException if the Configuration supplied is not valid
- */
- public void configure( Configuration configuration ) throws ConfigurationException
- {
- configure( this, configuration );
- }
-
- /**
- * Uses reflection to configure any Object, with the help of the Ant1
- * IntrospectionHelper. using . This aims to mimic (to some extent) the
- * Ant1-style configuration rules implemented by ProjectHelperImpl.
- * @param target
- * The object to be configured.
- * @param configuration
- * The data to configure the object with.
- * @throws ConfigurationException
- * If the Configuration is not valid for the configured object
- */
- protected void configure( Object target, Configuration configuration ) throws ConfigurationException
- {
- //TODO Maybe provide different configuration order for tasks not in a target,
- // elements in a TaskContainer etc...
- Ant1CompatConfigurer configurer =
- new Ant1CompatConfigurer( target, configuration, project );
- configurer.createChildren();
- configurer.configure();
- this.init();
- }
-
- /**
- * Returns the name of a Task/Datatype as referred to by Ant1 code, without
- * the "ant1." prefix.
- * @param fullName The full name as known by Myrmidon.
- * @return the name without the Ant1 prefix.
- */
- protected String getAnt1Name( String fullName )
- {
- return fullName.substring( Ant1CompatProject.ANT1_TASK_PREFIX.length() );
- }
-}
diff --git a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/taskdefs/AbstractAnt1AntTask.java b/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/taskdefs/AbstractAnt1AntTask.java
deleted file mode 100644
index 59681a1af..000000000
--- a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/taskdefs/AbstractAnt1AntTask.java
+++ /dev/null
@@ -1,238 +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.taskdefs;
-
-import java.util.Iterator;
-import java.util.Vector;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.DefaultConfiguration;
-import org.apache.myrmidon.api.TaskException;
-import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
-import org.apache.myrmidon.interfaces.executor.Executor;
-import org.apache.tools.ant.Ant1CompatProject;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-
-/**
- * A base class for Ant1 versions of <ant> and <antcall> tasks,
- * which delegate to the Myrmidon versions of these tasks.
- *
- * @author Darrell DeBoer
- * @version $Revision$ $Date$
- */
-public abstract class AbstractAnt1AntTask
- extends Task
-{
- /** the target to call if any */
- private String target = null;
- /** should we inherit properties from the parent ? */
- private boolean inheritAll = true;
- /** the properties to pass to the new project */
- private Vector properties = new Vector();
- /** the references to pass to the new project */
- private Vector references = new Vector();
-
- /**
- * If true, inherit all properties from parent Project
- * If false, inherit only userProperties and those defined
- * inside the ant call itself
- */
- public void setInheritAll( boolean value )
- {
- inheritAll = value;
- }
-
- /**
- * set the target to execute. If none is defined it will
- * execute the default target of the build file
- */
- public void setTarget( String s )
- {
- this.target = s;
- }
-
- /**
- * Create a nested property (ant) or param (antcall) element.
- */
- protected Property doCreateProperty()
- {
- Property p = new Property( true );
- properties.addElement( p );
- return p;
- }
-
- /**
- * create a reference element that identifies a data type that
- * should be carried over to the new project.
- */
- public void addReference( Reference r )
- {
- references.addElement( r );
- }
-
- /**
- * Helper class that implements the nested <reference>
- * element of <ant> and <antcall>.
- */
- public static class Reference
- extends org.apache.tools.ant.types.Reference
- {
-
- public Reference()
- {
- super();
- }
-
- private String targetid = null;
-
- public void setToRefid( String targetid )
- {
- this.targetid = targetid;
- }
-
- public String getToRefid()
- {
- return targetid;
- }
- }
-
- /**
- * Removes the Ant1CompatProject from the properties, builds a TaskModel for
- * executing the Myrmidon task, and executes that TaskModel.
- * @throws BuildException on error
- */
- public void execute() throws BuildException
- {
- Object ant1project = unsetAnt1Project();
-
- try
- {
- Configuration antConfig = constructTaskModel();
-
- executeTask( antConfig );
- }
- finally
- {
- resetAnt1Project( ant1project );
- }
- }
-
- /**
- * Executes the Myrmidon task detailed in the TaskModel provided.
- * @param taskModel the TaskModel for the task to execute.
- */
- private void executeTask( Configuration taskModel )
- {
- try
- {
- Executor executor = (Executor)m_context.getService( Executor.class );
- ExecutionFrame frame =
- (ExecutionFrame)m_context.getService( ExecutionFrame.class );
- executor.execute( taskModel, frame );
- }
- catch( TaskException e )
- {
- throw new BuildException( e );
- }
- }
-
- /**
- * Removes the Ant1CompatProject from the TaskContext properties.
- * @return the removed project
- * @throws BuildException
- */
- private Object unsetAnt1Project() throws BuildException
- {
- Object ant1project = null;
- try
- {
- ant1project =
- m_context.getProperty( Ant1CompatProject.ANT1_PROJECT_PROP );
- m_context.setProperty( Ant1CompatProject.ANT1_PROJECT_PROP, null );
- }
- catch( TaskException e )
- {
- throw new BuildException( e );
- }
- return ant1project;
- }
-
- /**
- * Adds the Ant1CompatProject back into the TaskContext properties.
- * @param ant1project the project to add.
- * @throws BuildException
- */
- private void resetAnt1Project( Object ant1project ) throws BuildException
- {
- try
- {
- m_context.setProperty( Ant1CompatProject.ANT1_PROJECT_PROP,
- ant1project );
- }
- catch( TaskException e )
- {
- throw new BuildException( e );
- }
- }
-
- /**
- * Builds the TaskModel for executing the Myrmidon version of a task.
- * @return a Configuration containing the TaskModel
- */
- protected Configuration constructTaskModel()
- {
- DefaultConfiguration antConfig = buildTaskModel();
-
- antConfig.setAttribute( "inherit-all", String.valueOf( inheritAll ) );
-
- // Ignore inheritRefs for now ( inheritAll == inheritRefs )
-
- if( target != null )
- {
- antConfig.setAttribute( "target", target );
- }
-
- addProperties( antConfig );
- addReferences( antConfig );
-
- return antConfig;
- }
-
- /**
- * Create the Myrmidon TaskModel, and configure with subclass-specific config.
- */
- protected abstract DefaultConfiguration buildTaskModel();
-
- /**
- * Adds all defined properties to the supplied Task model.
- * @param taskModel
- */
- protected void addProperties( DefaultConfiguration taskModel )
- {
- // Add all of the properties.
- Iterator iter = properties.iterator();
- while( iter.hasNext() )
- {
- DefaultConfiguration param = new DefaultConfiguration( "param", "" );
- Property property = (Property)iter.next();
- param.setAttribute( "name", property.getName() );
- param.setAttribute( "value", property.getValue() );
- taskModel.addChild( param );
- }
- }
-
- /**
- * Adds all defined references to the supplied Task model.
- * @param taskModel
- */
- protected void addReferences( DefaultConfiguration taskModel )
- {
- // TODO: Handle references.
- }
-
-}
diff --git a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/taskdefs/Ant.java b/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/taskdefs/Ant.java
deleted file mode 100644
index 3eb0ec907..000000000
--- a/proposal/myrmidon/src/ant1compat/org/apache/tools/ant/taskdefs/Ant.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000-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
- *
- *
- * <sometask>
- *
- * <somepath>
- * <pathelement location="/path/to/file.jar" />
- * <pathelement path="/path/to/file2.jar:/path/to/class2;/path/to/class3" />
- * <pathelement location="/path/to/file3.jar" />
- * <pathelement location="/path/to/file4.jar" />
- * </somepath>
- * </sometask>
- *
- * The object implemention sometask
must provide a method called
- * createSomepath
which returns an instance of Path
.
- * Nested path definitions are handled by the Path object and must be labeled
- * pathelement
.
- *
- * The path element takes a parameter path
which will be parsed
- * and split into single elements. It will usually be used
- * to define a path from an environment variable.
- *
- * @author Thomas.Haas@softwired-inc.com
- * @author Stefan Bodewig
- */
-
-public class Path extends DataType implements Cloneable {
-
- private Vector elements;
-
-
- public static Path systemClasspath =
- new Path(null, System.getProperty("java.class.path"));
-
-
- //Modified from original source.
- //Append Ant1Compat classpath to systemclasspath.
- // ------------------Modified--------------------------------
- static
- {
- // Add Ant1Compat.atl to system classpath.
- String classpath = LoaderUtils.getClasspath( Path.class.getClassLoader() );
- systemClasspath.append( new Path( null, classpath ) );
- }
- //-----------------End Modified------------------------------
-
-
- /**
- * Helper class, holds the nested <pathelement>
values.
- */
- public class PathElement {
- private String[] parts;
-
- public void setLocation(File loc) {
- parts = new String[] {translateFile(loc.getAbsolutePath())};
- }
-
- public void setPath(String path) {
- parts = Path.translatePath(getProject(), path);
- }
-
- public String[] getParts() {
- return parts;
- }
- }
-
- /**
- * Invoked by IntrospectionHelper for setXXX(Path p)
- * attribute setters.
- */
- public Path(Project p, String path) {
- this(p);
- createPathElement().setPath(path);
- }
-
- public Path(Project project) {
- setProject(project);
- elements = new Vector();
- }
-
- /**
- * Adds a element definition to the path.
- * @param location the location of the element to add (must not be
- * null
nor empty.
- */
- public void setLocation(File location) throws BuildException {
- if (isReference()) {
- throw tooManyAttributes();
- }
- createPathElement().setLocation(location);
- }
-
-
- /**
- * Parses a path definition and creates single PathElements.
- * @param path the path definition.
- */
- public void setPath(String path) throws BuildException {
- if (isReference()) {
- throw tooManyAttributes();
- }
- createPathElement().setPath(path);
- }
-
- /**
- * Makes this instance in effect a reference to another Path instance.
- *
- *
You must not set another attribute or nest elements inside - * this element if you make it a reference.
- */ - public void setRefid(Reference r) throws BuildException { - if (!elements.isEmpty()) { - throw tooManyAttributes(); - } - elements.addElement(r); - super.setRefid(r); - } - - /** - * Creates the nested<pathelement>
element.
- */
- public PathElement createPathElement() throws BuildException {
- if (isReference()) {
- throw noChildrenAllowed();
- }
- PathElement pe = new PathElement();
- elements.addElement(pe);
- return pe;
- }
-
- /**
- * Adds a nested <fileset>
element.
- */
- public void addFileset(FileSet fs) throws BuildException {
- if (isReference()) {
- throw noChildrenAllowed();
- }
- elements.addElement(fs);
- checked = false;
- }
-
- /**
- * Creates a nested <path>
element.
- */
- public Path createPath() throws BuildException {
- if (isReference()) {
- throw noChildrenAllowed();
- }
- Path p = new Path(getProject());
- elements.addElement(p);
- checked = false;
- return p;
- }
-
- /**
- * Append the contents of the other Path instance to this.
- */
- public void append(Path other) {
- if (other == null) {
- return;
- }
- String[] l = other.list();
- for (int i=0; i