Browse Source

Rearranged location for final tasks still left in ant namespace.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269240 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
e4c765d38a
6 changed files with 24 additions and 18 deletions
  1. +7
    -5
      proposal/myrmidon/src/java/org/apache/myrmidon/libs/core/Property.java
  2. +8
    -7
      proposal/myrmidon/src/java/org/apache/myrmidon/libs/runtime/AntCall.java
  3. +1
    -1
      proposal/myrmidon/src/java/org/apache/myrmidon/libs/runtime/Import.java
  4. +5
    -2
      proposal/myrmidon/src/make/sample.ant
  5. +1
    -2
      proposal/myrmidon/src/manifest/core-ant-descriptor.xml
  6. +2
    -1
      proposal/myrmidon/src/manifest/runtime-ant-descriptor.xml

proposal/myrmidon/src/java/org/apache/ant/modules/basic/Property.java → proposal/myrmidon/src/java/org/apache/myrmidon/libs/core/Property.java View File

@@ -5,7 +5,7 @@
* version 1.1, a copy of which has been included with this distribution in
* 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.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.Configuration;
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.components.type.TypeManager;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.components.type.TypeException;
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.
*
* TODO: Determine final format of property task.
*
* @author <a href="mailto:donaldp@apache.org">Peter Donald</a>
*/
public class Property

proposal/myrmidon/src/java/org/apache/ant/modules/basic/AntCall.java → proposal/myrmidon/src/java/org/apache/myrmidon/libs/runtime/AntCall.java View File

@@ -5,7 +5,7 @@
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.ant.modules.basic;
package org.apache.myrmidon.libs.runtime;

import java.util.ArrayList;
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.context.Context;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.DefaultTaskContext;
import org.apache.myrmidon.api.TaskContext;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.components.manager.ProjectManager;
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>
*/
@@ -53,7 +53,7 @@ public class AntCall
{
m_target = target;
}
/*
public Property createParam()
throws Exception
{
@@ -64,7 +64,7 @@ public class AntCall
m_properties.add( property );
return property;
}
*/
public void execute()
throws TaskException
{
@@ -73,19 +73,20 @@ public class AntCall
throw new TaskException( "Target attribute must be specified" );
}

/*
final int size = m_properties.size();
for( int i = 0; i < size; i++ )
{
final Property property = (Property)m_properties.get( i );
property.execute();
}
*/
getLogger().info( "Calling target " + m_target );

//This calls startProject() which is probably not wanted???
//TODO: FIXME when scoping is decided
//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" );
}
}

proposal/myrmidon/src/java/org/apache/myrmidon/libs/runtime/ImportTask.java → proposal/myrmidon/src/java/org/apache/myrmidon/libs/runtime/Import.java View File

@@ -23,7 +23,7 @@ import org.apache.myrmidon.components.deployer.DeploymentException;
*
* @author <a href="mailto:donaldp@apache.org">Peter Donald</a>
*/
public class ImportTask
public class Import
extends AbstractTask
implements Composable
{

+ 5
- 2
proposal/myrmidon/src/make/sample.ant View File

@@ -39,23 +39,26 @@ Legal:
<target name="typedef-test">
<typedef name="echo2"
type="task"
classname="org.apache.ant.modules.basic.Echo"
classname="org.apache.myrmidon.libs.core.Echo"
lib="../../dist/lib/core.atl" />

<echo2 message="Luke to Echo base. Can you hear me?"/>
</target>

<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"
destination-type="java.lang.Class"
lib="../../dist/lib/core.atl" />
</target>

<target name="ant-call-test">
<!-- test elided until we decide scope and necessity of ant-call -->
<!--
<ant-call target="ant-call-test-target">
<param name="blah" value="blah-value" />
</ant-call>
-->
</target>

<target name="ant-call-test-target">


+ 1
- 2
proposal/myrmidon/src/manifest/core-ant-descriptor.xml View File

@@ -4,8 +4,7 @@

<!-- basic tasks/datatypes/coverters required in most environments -->
<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>


+ 2
- 1
proposal/myrmidon/src/manifest/runtime-ant-descriptor.xml View File

@@ -6,7 +6,8 @@
<task name="facility" classname="org.apache.myrmidon.libs.runtime.Facility" />
<task name="typedef" classname="org.apache.myrmidon.libs.runtime.TypeDef" />
<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>


Loading…
Cancel
Save