Browse Source

* Added 'property-resolver' role, with 'default'

and 'classic' implementations.
* Ant1CompatProject doesn't instantiate
  ClassicPropertyResolver directly.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272009 13f79535-47bb-0310-9956-ffa450edef68
master
Darrell DeBoer 23 years ago
parent
commit
b857ad5df2
5 changed files with 22 additions and 2 deletions
  1. +14
    -2
      proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Ant1CompatProject.java
  2. +2
    -0
      proposal/myrmidon/src/java/org/apache/myrmidon/components/property/ClassicPropertyResolver.java
  3. +2
    -0
      proposal/myrmidon/src/java/org/apache/myrmidon/components/property/DefaultPropertyResolver.java
  4. +2
    -0
      proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/property/PropertyResolver.java
  5. +2
    -0
      proposal/myrmidon/src/xdocs/todo.xml

+ 14
- 2
proposal/myrmidon/src/ant1compat/org/apache/tools/ant/Ant1CompatProject.java View File

@@ -21,9 +21,10 @@ import org.apache.aut.converter.Converter;
import org.apache.aut.converter.ConverterException;
import org.apache.myrmidon.api.TaskContext;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.components.property.ClassicPropertyResolver;
import org.apache.myrmidon.interfaces.property.PropertyResolver;
import org.apache.myrmidon.interfaces.type.DefaultTypeFactory;
import org.apache.myrmidon.interfaces.type.TypeException;
import org.apache.myrmidon.interfaces.type.TypeFactory;
import org.apache.myrmidon.interfaces.type.TypeManager;

/**
@@ -63,8 +64,19 @@ public class Ant1CompatProject extends Project
setName( projectName );
}

m_ant1PropertyResolver = new ClassicPropertyResolver();
m_converter = (Converter)context.getService( Converter.class );

TypeManager typeManager = (TypeManager)context.getService( TypeManager.class );
try
{
TypeFactory factory = typeManager.getFactory( PropertyResolver.ROLE );
m_ant1PropertyResolver = (PropertyResolver)factory.create( "classic" );
}
catch( TypeException e )
{
throw new TaskException( "Failed to create PropertyResolver.", e );
}

}

/**


+ 2
- 0
proposal/myrmidon/src/java/org/apache/myrmidon/components/property/ClassicPropertyResolver.java View File

@@ -16,6 +16,8 @@ import org.apache.myrmidon.api.TaskContext;
*
* @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
* @version $Revision$ $Date$
*
* @ant.type type="property-resolver" name="classic"
*/
public class ClassicPropertyResolver
extends DefaultPropertyResolver


+ 2
- 0
proposal/myrmidon/src/java/org/apache/myrmidon/components/property/DefaultPropertyResolver.java View File

@@ -24,6 +24,8 @@ import org.apache.myrmidon.interfaces.property.PropertyResolver;
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
* @version $Revision$ $Date$
*
* @ant.type type="property-resolver" name="default"
*/
public class DefaultPropertyResolver
implements PropertyResolver, Serviceable


+ 2
- 0
proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/property/PropertyResolver.java View File

@@ -17,6 +17,8 @@ import org.apache.myrmidon.api.TaskContext;
*
* @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
* @version $Revision$ $Date$
*
* @ant:role shorthand="property-resolver"
*/
public interface PropertyResolver
{


+ 2
- 0
proposal/myrmidon/src/xdocs/todo.xml View File

@@ -98,12 +98,14 @@ public class MyrmidonSecurityManager
Write tests for the various bits that rely on Myrmidon
functionality:
<ul>
<li>Simple sanity test</li>
<li>if/unless on targets: check that behaviour complies with Ant1</li>
<li>Make sure properties are shared between Ant1 and Myrmidon tasks.</li>
<li>Make sure that &lt;ant1.property&gt; behaves as per Ant1</li>
</ul>
</li>
<li>Get GUMP runs going using Myrmidon.</li>
<li>i18n messages</li>
</ul>
</subsection>



Loading…
Cancel
Save