git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269240 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -5,7 +5,7 @@ | |||||
| * version 1.1, a copy of which has been included with this distribution in | * version 1.1, a copy of which has been included with this distribution in | ||||
| * the LICENSE file. | * the LICENSE file. | ||||
| */ | */ | ||||
| package org.apache.ant.modules.basic; | |||||
| package org.apache.myrmidon.libs.core; | |||||
| import org.apache.avalon.framework.component.ComponentException; | import org.apache.avalon.framework.component.ComponentException; | ||||
| import org.apache.avalon.framework.component.ComponentManager; | import org.apache.avalon.framework.component.ComponentManager; | ||||
| @@ -13,17 +13,19 @@ import org.apache.avalon.framework.component.Composable; | |||||
| import org.apache.avalon.framework.configuration.Configurable; | import org.apache.avalon.framework.configuration.Configurable; | ||||
| import org.apache.avalon.framework.configuration.Configuration; | import org.apache.avalon.framework.configuration.Configuration; | ||||
| import org.apache.avalon.framework.configuration.ConfigurationException; | import org.apache.avalon.framework.configuration.ConfigurationException; | ||||
| import org.apache.myrmidon.framework.AbstractContainerTask; | |||||
| import org.apache.myrmidon.framework.DataType; | |||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.myrmidon.components.type.TypeManager; | |||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.myrmidon.components.type.TypeException; | import org.apache.myrmidon.components.type.TypeException; | ||||
| import org.apache.myrmidon.components.type.TypeFactory; | import org.apache.myrmidon.components.type.TypeFactory; | ||||
| import org.apache.myrmidon.components.type.TypeManager; | |||||
| import org.apache.myrmidon.framework.AbstractContainerTask; | |||||
| import org.apache.myrmidon.framework.DataType; | |||||
| /** | /** | ||||
| * This is the property "task" to declare a binding of a datatype to a name. | * This is the property "task" to declare a binding of a datatype to a name. | ||||
| * | * | ||||
| * TODO: Determine final format of property task. | |||||
| * | |||||
| * @author <a href="mailto:donaldp@apache.org">Peter Donald</a> | * @author <a href="mailto:donaldp@apache.org">Peter Donald</a> | ||||
| */ | */ | ||||
| public class Property | public class Property | ||||
| @@ -5,7 +5,7 @@ | |||||
| * version 1.1, a copy of which has been included with this distribution in | * version 1.1, a copy of which has been included with this distribution in | ||||
| * the LICENSE file. | * the LICENSE file. | ||||
| */ | */ | ||||
| package org.apache.ant.modules.basic; | |||||
| package org.apache.myrmidon.libs.runtime; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import org.apache.avalon.framework.component.ComponentException; | import org.apache.avalon.framework.component.ComponentException; | ||||
| @@ -13,14 +13,14 @@ import org.apache.avalon.framework.component.ComponentManager; | |||||
| import org.apache.avalon.framework.component.Composable; | import org.apache.avalon.framework.component.Composable; | ||||
| import org.apache.avalon.framework.context.Context; | import org.apache.avalon.framework.context.Context; | ||||
| import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.myrmidon.api.DefaultTaskContext; | import org.apache.myrmidon.api.DefaultTaskContext; | ||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.myrmidon.components.manager.ProjectManager; | import org.apache.myrmidon.components.manager.ProjectManager; | ||||
| import org.apache.myrmidon.components.model.Project; | import org.apache.myrmidon.components.model.Project; | ||||
| /** | /** | ||||
| * This is abstract base class for tasklets. | |||||
| * TODO: Determine if low cost antcalls are needed. | |||||
| * | * | ||||
| * @author <a href="mailto:donaldp@apache.org">Peter Donald</a> | * @author <a href="mailto:donaldp@apache.org">Peter Donald</a> | ||||
| */ | */ | ||||
| @@ -53,7 +53,7 @@ public class AntCall | |||||
| { | { | ||||
| m_target = target; | m_target = target; | ||||
| } | } | ||||
| /* | |||||
| public Property createParam() | public Property createParam() | ||||
| throws Exception | throws Exception | ||||
| { | { | ||||
| @@ -64,7 +64,7 @@ public class AntCall | |||||
| m_properties.add( property ); | m_properties.add( property ); | ||||
| return property; | return property; | ||||
| } | } | ||||
| */ | |||||
| public void execute() | public void execute() | ||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| @@ -73,19 +73,20 @@ public class AntCall | |||||
| throw new TaskException( "Target attribute must be specified" ); | throw new TaskException( "Target attribute must be specified" ); | ||||
| } | } | ||||
| /* | |||||
| final int size = m_properties.size(); | final int size = m_properties.size(); | ||||
| for( int i = 0; i < size; i++ ) | for( int i = 0; i < size; i++ ) | ||||
| { | { | ||||
| final Property property = (Property)m_properties.get( i ); | final Property property = (Property)m_properties.get( i ); | ||||
| property.execute(); | property.execute(); | ||||
| } | } | ||||
| */ | |||||
| getLogger().info( "Calling target " + m_target ); | getLogger().info( "Calling target " + m_target ); | ||||
| //This calls startProject() which is probably not wanted??? | //This calls startProject() which is probably not wanted??? | ||||
| //TODO: FIXME when scoping is decided | //TODO: FIXME when scoping is decided | ||||
| //m_projectManager.executeProject( m_project, m_target ); | //m_projectManager.executeProject( m_project, m_target ); | ||||
| getLogger().warn( "ANTCALL NOT IMPLEMENTED - waiting for " + | |||||
| getLogger().warn( "ANTCALL NOT IMPLEMENTED - waiting for " + | |||||
| "scope rules to be decided" ); | "scope rules to be decided" ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -23,7 +23,7 @@ import org.apache.myrmidon.components.deployer.DeploymentException; | |||||
| * | * | ||||
| * @author <a href="mailto:donaldp@apache.org">Peter Donald</a> | * @author <a href="mailto:donaldp@apache.org">Peter Donald</a> | ||||
| */ | */ | ||||
| public class ImportTask | |||||
| public class Import | |||||
| extends AbstractTask | extends AbstractTask | ||||
| implements Composable | implements Composable | ||||
| { | { | ||||
| @@ -39,23 +39,26 @@ Legal: | |||||
| <target name="typedef-test"> | <target name="typedef-test"> | ||||
| <typedef name="echo2" | <typedef name="echo2" | ||||
| type="task" | type="task" | ||||
| classname="org.apache.ant.modules.basic.Echo" | |||||
| classname="org.apache.myrmidon.libs.core.Echo" | |||||
| lib="../../dist/lib/core.atl" /> | lib="../../dist/lib/core.atl" /> | ||||
| <echo2 message="Luke to Echo base. Can you hear me?"/> | <echo2 message="Luke to Echo base. Can you hear me?"/> | ||||
| </target> | </target> | ||||
| <target name="converterdef-test"> | <target name="converterdef-test"> | ||||
| <converterdef classname="org.apache.ant.modules.basic.StringToClassConverter" | |||||
| <converterdef classname="org.apache.myrmidon.libs.core.StringToClassConverter" | |||||
| source-type="java.lang.String" | source-type="java.lang.String" | ||||
| destination-type="java.lang.Class" | destination-type="java.lang.Class" | ||||
| lib="../../dist/lib/core.atl" /> | lib="../../dist/lib/core.atl" /> | ||||
| </target> | </target> | ||||
| <target name="ant-call-test"> | <target name="ant-call-test"> | ||||
| <!-- test elided until we decide scope and necessity of ant-call --> | |||||
| <!-- | |||||
| <ant-call target="ant-call-test-target"> | <ant-call target="ant-call-test-target"> | ||||
| <param name="blah" value="blah-value" /> | <param name="blah" value="blah-value" /> | ||||
| </ant-call> | </ant-call> | ||||
| --> | |||||
| </target> | </target> | ||||
| <target name="ant-call-test-target"> | <target name="ant-call-test-target"> | ||||
| @@ -4,8 +4,7 @@ | |||||
| <!-- basic tasks/datatypes/coverters required in most environments --> | <!-- basic tasks/datatypes/coverters required in most environments --> | ||||
| <task name="echo" classname="org.apache.myrmidon.libs.core.Echo" /> | <task name="echo" classname="org.apache.myrmidon.libs.core.Echo" /> | ||||
| <task name="property" classname="org.apache.ant.modules.basic.Property" /> | |||||
| <task name="ant-call" classname="org.apache.ant.modules.basic.AntCall" /> | |||||
| <task name="property" classname="org.apache.myrmidon.libs.core.Property" /> | |||||
| </types> | </types> | ||||
| @@ -6,7 +6,8 @@ | |||||
| <task name="facility" classname="org.apache.myrmidon.libs.runtime.Facility" /> | <task name="facility" classname="org.apache.myrmidon.libs.runtime.Facility" /> | ||||
| <task name="typedef" classname="org.apache.myrmidon.libs.runtime.TypeDef" /> | <task name="typedef" classname="org.apache.myrmidon.libs.runtime.TypeDef" /> | ||||
| <task name="converterdef" classname="org.apache.myrmidon.libs.runtime.ConverterDef" /> | <task name="converterdef" classname="org.apache.myrmidon.libs.runtime.ConverterDef" /> | ||||
| <task name="import" classname="org.apache.myrmidon.libs.runtime.ImportTask" /> | |||||
| <task name="import" classname="org.apache.myrmidon.libs.runtime.Import" /> | |||||
| <task name="ant-call" classname="org.apache.myrmidon.libs.runtime.AntCall" /> | |||||
| </types> | </types> | ||||