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-ffa450edef68master
@@ -21,9 +21,10 @@ import org.apache.aut.converter.Converter; | |||||
import org.apache.aut.converter.ConverterException; | import org.apache.aut.converter.ConverterException; | ||||
import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
import org.apache.myrmidon.api.TaskException; | 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.property.PropertyResolver; | ||||
import org.apache.myrmidon.interfaces.type.DefaultTypeFactory; | 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; | import org.apache.myrmidon.interfaces.type.TypeManager; | ||||
/** | /** | ||||
@@ -63,8 +64,19 @@ public class Ant1CompatProject extends Project | |||||
setName( projectName ); | setName( projectName ); | ||||
} | } | ||||
m_ant1PropertyResolver = new ClassicPropertyResolver(); | |||||
m_converter = (Converter)context.getService( Converter.class ); | 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 ); | |||||
} | |||||
} | } | ||||
/** | /** | ||||
@@ -16,6 +16,8 @@ import org.apache.myrmidon.api.TaskContext; | |||||
* | * | ||||
* @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a> | * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a> | ||||
* @version $Revision$ $Date$ | * @version $Revision$ $Date$ | ||||
* | |||||
* @ant.type type="property-resolver" name="classic" | |||||
*/ | */ | ||||
public class ClassicPropertyResolver | public class ClassicPropertyResolver | ||||
extends DefaultPropertyResolver | extends DefaultPropertyResolver | ||||
@@ -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:peter@apache.org">Peter Donald</a> | ||||
* @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a> | * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a> | ||||
* @version $Revision$ $Date$ | * @version $Revision$ $Date$ | ||||
* | |||||
* @ant.type type="property-resolver" name="default" | |||||
*/ | */ | ||||
public class DefaultPropertyResolver | public class DefaultPropertyResolver | ||||
implements PropertyResolver, Serviceable | implements PropertyResolver, Serviceable | ||||
@@ -17,6 +17,8 @@ import org.apache.myrmidon.api.TaskContext; | |||||
* | * | ||||
* @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a> | * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a> | ||||
* @version $Revision$ $Date$ | * @version $Revision$ $Date$ | ||||
* | |||||
* @ant:role shorthand="property-resolver" | |||||
*/ | */ | ||||
public interface PropertyResolver | public interface PropertyResolver | ||||
{ | { | ||||
@@ -98,12 +98,14 @@ public class MyrmidonSecurityManager | |||||
Write tests for the various bits that rely on Myrmidon | Write tests for the various bits that rely on Myrmidon | ||||
functionality: | functionality: | ||||
<ul> | <ul> | ||||
<li>Simple sanity test</li> | |||||
<li>if/unless on targets: check that behaviour complies with Ant1</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 properties are shared between Ant1 and Myrmidon tasks.</li> | ||||
<li>Make sure that <ant1.property> behaves as per Ant1</li> | <li>Make sure that <ant1.property> behaves as per Ant1</li> | ||||
</ul> | </ul> | ||||
</li> | </li> | ||||
<li>Get GUMP runs going using Myrmidon.</li> | <li>Get GUMP runs going using Myrmidon.</li> | ||||
<li>i18n messages</li> | |||||
</ul> | </ul> | ||||
</subsection> | </subsection> | ||||