ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/filters LineFilter.java TokenSet.java
Date Wed, 24 Apr 2002 02:21:01 GMT
adammurdoch    02/04/23 19:21:01

  Modified:    antlib/src/java/org/apache/antlib/java
                        JavaCompilerAdaptor.java
               antlib/src/java/org/apache/antlib/runtime
                        Resources.properties TypeAvailableCondition.java
               antlib/src/java/org/apache/antlib/vfile FileList.java
                        FileSet.java
               antlib/src/java/org/apache/antlib/vfile/selectors
                        FileSelector.java
               api/src/java/org/apache/myrmidon/api Task.java
               api/src/java/org/apache/myrmidon/aspects
                        AbstractAspectHandler.java AspectHandler.java
               api/src/java/org/apache/myrmidon/listeners
                        ProjectListener.java
               aut/src/java/org/apache/aut/converter Converter.java
               aut/src/java/org/apache/aut/nativelib ExecManager.java
               aut/src/java/org/apache/aut/vfs FileSystemManager.java
               aut/src/java/org/apache/aut/vfs/provider
                        FileSystemProvider.java
               buildtools/src/java/org/apache/myrmidon/build ant-roles.j
               container/src/java/org/apache/myrmidon/components/aspect
                        DefaultAspectManager.java
               container/src/java/org/apache/myrmidon/components/configurer
                        DefaultConfigurer.java
               container/src/java/org/apache/myrmidon/components/deployer
                        DefaultDeployer.java Resources.properties
                        RoleDefinition.java RoleDescriptorBuilder.java
                        ServiceDefinition.java
                        ServiceDescriptorBuilder.java
               container/src/java/org/apache/myrmidon/components/role
                        DefaultRoleManager.java Resources.properties
               container/src/java/org/apache/myrmidon/components/service
                        InstantiatingServiceManager.java
               container/src/java/org/apache/myrmidon/components/type
                        DefaultTypeManager.java
               container/src/java/org/apache/myrmidon/components/workspace
                        DefaultTaskContext.java
               container/src/java/org/apache/myrmidon/interfaces/builder
                        ProjectBuilder.java
               container/src/java/org/apache/myrmidon/interfaces/configurer
                        Configurer.java
               container/src/java/org/apache/myrmidon/interfaces/deployer
                        ConverterDefinition.java TypeDefinition.java
               container/src/java/org/apache/myrmidon/interfaces/property
                        PropertyResolver.java
               container/src/java/org/apache/myrmidon/interfaces/role
                        RoleInfo.java RoleManager.java
               container/src/java/org/apache/myrmidon/interfaces/service
                        ServiceFactory.java
               container/src/test/org/apache/myrmidon/components
                        AbstractComponentTest.java TestDataType.java
               container/src/test/org/apache/myrmidon/components/configurer/test
                        DefaultConfigurerTestCase.java MyRole1.java
               container/src/test/org/apache/myrmidon/components/deployer/test
                        TestRole1.java ant-roles.xml
               container/src/test/org/apache/myrmidon/components/role/test
                        DefaultRoleManagerTestCase.java
               container/src/test/org/apache/myrmidon/components/service/test
                        InstantiatingServiceManagerTestCase.java
               framework/src/java/org/apache/myrmidon/framework
                        AbstractContainerTask.java DataType.java
                        FileNameMapper.java
               framework/src/java/org/apache/myrmidon/framework/conditions
                        Condition.java
               framework/src/java/org/apache/myrmidon/framework/file
                        FileList.java
               framework/src/java/org/apache/myrmidon/framework/filters
                        LineFilter.java TokenSet.java
  Log:
  Combine role short and long names, so that a role has one name only:
  
  * Axed RoleInfo.getShortname() and RoleManager.getRoleByShorthandName().
  
  * Renamed a bunch of methods on RoleManager and RoleInfo, to hopefully make
    their meaning clearer.
  
  * Changed the ROLE field of most interfaces, from class name to the shorthand
    name for that role.
  
  * Renamed @ant:role tag to @ant.role.  Renamed 'shorthand' attribute to 'name'.
  
  * Renamed attributes of <role> elements in roles descriptor.
  
  * Changed DefaultTaskContext.getService() to map service class to a role name,
    rather than assuming that the class name and role name are the same.
  
  Revision  Changes    Path
  1.2       +2 -2      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/java/JavaCompilerAdaptor.java
  
  Index: JavaCompilerAdaptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/java/JavaCompilerAdaptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JavaCompilerAdaptor.java	14 Apr 2002 10:56:03 -0000	1.1
  +++ JavaCompilerAdaptor.java	24 Apr 2002 02:20:58 -0000	1.2
  @@ -29,9 +29,9 @@
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    * @author <a href="mailto:jayglanville@home.com">J D Glanville</a>
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 10:56:03 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/24 02:20:58 $
    *
  - * @ant.role shorthand="java-compiler"
  + * @ant.role name="java-compiler"
    */
   public abstract class JavaCompilerAdaptor
   {
  
  
  
  1.2       +0 -1      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/runtime/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/runtime/Resources.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Resources.properties	14 Apr 2002 10:55:08 -0000	1.1
  +++ Resources.properties	24 Apr 2002 02:20:58 -0000	1.2
  @@ -6,5 +6,4 @@
   import.no-deploy.error=Error importing tasklib.
   
   typeavailable.no-type-name.error=No type name was specified.
  -typeavailable.unknown-role.error=Unknown role "{0}".
   typeavailable.evaluate.error=Could not determine if type "{0}" is available.
  
  
  
  1.2       +16 -31    jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/runtime/TypeAvailableCondition.java
  
  Index: TypeAvailableCondition.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/runtime/TypeAvailableCondition.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TypeAvailableCondition.java	14 Apr 2002 10:55:08 -0000	1.1
  +++ TypeAvailableCondition.java	24 Apr 2002 02:20:58 -0000	1.2
  @@ -7,22 +7,20 @@
    */
   package org.apache.antlib.runtime;
   
  -import org.apache.myrmidon.framework.conditions.Condition;
  -import org.apache.myrmidon.framework.DataType;
  +import org.apache.avalon.excalibur.i18n.ResourceManager;
  +import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.interfaces.role.RoleManager;
  -import org.apache.myrmidon.interfaces.role.RoleInfo;
  -import org.apache.myrmidon.interfaces.type.TypeManager;
  +import org.apache.myrmidon.framework.DataType;
  +import org.apache.myrmidon.framework.conditions.Condition;
   import org.apache.myrmidon.interfaces.type.TypeFactory;
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
  +import org.apache.myrmidon.interfaces.type.TypeManager;
   
   /**
    * A condition that evaluates to true if a particular type is available.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 10:55:08 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/24 02:20:58 $
    *
    * @ant.type type="condition" name="type-available"
    */
  @@ -32,15 +30,15 @@
       private static final Resources REZ =
           ResourceManager.getPackageResources( TypeAvailableCondition.class );
   
  -    private String m_roleShorthand;
  -    private String m_name;
  +    private String m_roleName;
  +    private String m_typeName;
   
       /**
        * Sets the role to search for.
        */
       public void setType( final String type )
       {
  -        m_roleShorthand = type;
  +        m_roleName = type;
       }
   
       /**
  @@ -48,7 +46,7 @@
        */
       public void setName( final String name )
       {
  -        m_name = name;
  +        m_typeName = name;
       }
   
       /**
  @@ -60,7 +58,7 @@
       public boolean evaluate( final TaskContext context )
           throws TaskException
       {
  -        if( m_name == null )
  +        if( m_typeName == null )
           {
               final String message = REZ.getString( "typeavailable.no-type-name.error" );
               throw new TaskException( message );
  @@ -68,34 +66,21 @@
   
           try
           {
  -            // Map the shorthand name to a role
  -            final String roleName;
  -            if( m_roleShorthand != null )
  -            {
  -                final RoleManager roleManager = (RoleManager)context.getService( RoleManager.class );
  -                final RoleInfo roleInfo = roleManager.getRoleByShorthandName( m_roleShorthand );
  -                if( roleInfo == null )
  -                {
  -                    final String message = REZ.getString( "typeavailable.unknown-role.error", m_roleShorthand );
  -                    throw new TaskException( message );
  -                }
  -                roleName = roleInfo.getName();
  -            }
  -            else
  +            if( m_roleName == null )
               {
  -                roleName = DataType.ROLE;
  +                m_roleName = DataType.ROLE;
               }
   
               // Lookup the type
               final TypeManager typeManager = (TypeManager)context.getService( TypeManager.class );
  -            final TypeFactory typeFactory = typeManager.getFactory( roleName );
  +            final TypeFactory typeFactory = typeManager.getFactory( m_roleName );
   
               // Check if the type is available
  -            return typeFactory.canCreate( m_name );
  +            return typeFactory.canCreate( m_typeName );
           }
           catch( final Exception e )
           {
  -            final String message = REZ.getString( "typeavailable.evaluate.error", m_name );
  +            final String message = REZ.getString( "typeavailable.evaluate.error", m_typeName );
               throw new TaskException( message, e );
           }
       }
  
  
  
  1.2       +1 -1      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/vfile/FileList.java
  
  Index: FileList.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/vfile/FileList.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileList.java	14 Apr 2002 10:56:19 -0000	1.1
  +++ FileList.java	24 Apr 2002 02:20:58 -0000	1.2
  @@ -17,7 +17,7 @@
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
    *
  - * @ant:role shorthand="v-path"
  + * @ant.role name="v-path"
    */
   public interface FileList
       extends DataType
  
  
  
  1.2       +1 -1      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/vfile/FileSet.java
  
  Index: FileSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/vfile/FileSet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileSet.java	14 Apr 2002 10:56:19 -0000	1.1
  +++ FileSet.java	24 Apr 2002 02:20:58 -0000	1.2
  @@ -17,7 +17,7 @@
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
    *
  - * @ant:role shorthand="v-fileset"
  + * @ant.role name="v-fileset"
    */
   public interface FileSet
       extends DataType
  
  
  
  1.2       +2 -2      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/vfile/selectors/FileSelector.java
  
  Index: FileSelector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/vfile/selectors/FileSelector.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileSelector.java	14 Apr 2002 10:56:19 -0000	1.1
  +++ FileSelector.java	24 Apr 2002 02:20:59 -0000	1.2
  @@ -15,9 +15,9 @@
    * Accepts files as part of a set.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 10:56:19 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/24 02:20:59 $
    *
  - * @ant:role shorthand="v-file-selector"
  + * @ant.role name="v-file-selector"
    */
   public interface FileSelector
   {
  
  
  
  1.17      +3 -3      jakarta-ant-myrmidon/api/src/java/org/apache/myrmidon/api/Task.java
  
  Index: Task.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/api/src/java/org/apache/myrmidon/api/Task.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Task.java	18 Mar 2002 08:53:29 -0000	1.16
  +++ Task.java	24 Apr 2002 02:20:59 -0000	1.17
  @@ -16,12 +16,12 @@
    * onto the task object.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.16 $ $Date: 2002/03/18 08:53:29 $
  - * @ant:role shorthand="task"
  + * @version $Revision: 1.17 $ $Date: 2002/04/24 02:20:59 $
  + * @ant.role name="task"
    */
   public interface Task
   {
  -    String ROLE = Task.class.getName();
  +    String ROLE = "task";
   
       /**
        * Specify the context in which the task operates in.
  
  
  
  1.12      +1 -7      jakarta-ant-myrmidon/api/src/java/org/apache/myrmidon/aspects/AbstractAspectHandler.java
  
  Index: AbstractAspectHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/api/src/java/org/apache/myrmidon/aspects/AbstractAspectHandler.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AbstractAspectHandler.java	21 Apr 2002 01:41:33 -0000	1.11
  +++ AbstractAspectHandler.java	24 Apr 2002 02:20:59 -0000	1.12
  @@ -18,7 +18,7 @@
    *
    * @author Conor MacNeill
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.11 $ $Date: 2002/04/21 01:41:33 $
  + * @version $Revision: 1.12 $ $Date: 2002/04/24 02:20:59 $
    */
   public abstract class AbstractAspectHandler
       implements AspectHandler
  @@ -47,12 +47,6 @@
           throws TaskException
       {
           m_task = task;
  -    }
  -
  -    public void preLogEnabled( final Logger logger )
  -        throws TaskException
  -    {
  -        m_logger = logger;
       }
   
       public void preConfigure( final ModelElement taskModel )
  
  
  
  1.16      +3 -4      jakarta-ant-myrmidon/api/src/java/org/apache/myrmidon/aspects/AspectHandler.java
  
  Index: AspectHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/api/src/java/org/apache/myrmidon/aspects/AspectHandler.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- AspectHandler.java	23 Apr 2002 06:26:15 -0000	1.15
  +++ AspectHandler.java	24 Apr 2002 02:20:59 -0000	1.16
  @@ -8,7 +8,6 @@
   package org.apache.myrmidon.aspects;
   
   import java.util.Properties;
  -import org.apache.avalon.framework.logger.Logger;
   import org.apache.myrmidon.api.Task;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.api.metadata.ModelElement;
  @@ -18,12 +17,12 @@
    *
    * @author Conor MacNeill
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.15 $ $Date: 2002/04/23 06:26:15 $
  - * @ant:role shorthand="aspect"
  + * @version $Revision: 1.16 $ $Date: 2002/04/24 02:20:59 $
  + * @ant.role name="aspect"
    */
   public interface AspectHandler
   {
  -    String ROLE = AspectHandler.class.getName();
  +    String ROLE = "aspect";
   
       ModelElement preCreate( ModelElement taskModel )
           throws TaskException;
  
  
  
  1.10      +3 -3      jakarta-ant-myrmidon/api/src/java/org/apache/myrmidon/listeners/ProjectListener.java
  
  Index: ProjectListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/api/src/java/org/apache/myrmidon/listeners/ProjectListener.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ProjectListener.java	23 Mar 2002 23:20:35 -0000	1.9
  +++ ProjectListener.java	24 Apr 2002 02:20:59 -0000	1.10
  @@ -12,15 +12,15 @@
    * notification of project status.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.9 $ $Date: 2002/03/23 23:20:35 $
  - * @ant:role shorthand="listener"
  + * @version $Revision: 1.10 $ $Date: 2002/04/24 02:20:59 $
  + * @ant.role name="listener"
    * @todo Think about having a way to indicate that a foreign project
    *       is being referenced, a implicit target is being referenced
    *       and that a library is being imported.
    */
   public interface ProjectListener
   {
  -    String ROLE = ProjectListener.class.getName();
  +    String ROLE = "listener";
   
       /**
        * Notify the listener that a project is about to start.  This method
  
  
  
  1.7       +3 -3      jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/Converter.java
  
  Index: Converter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/Converter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Converter.java	14 Apr 2002 09:22:48 -0000	1.6
  +++ Converter.java	24 Apr 2002 02:20:59 -0000	1.7
  @@ -11,13 +11,13 @@
    * Instances of this interface are used to convert between different types.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.6 $ $Date: 2002/04/14 09:22:48 $
  - * @ant:role shorthand="converter"
  + * @version $Revision: 1.7 $ $Date: 2002/04/24 02:20:59 $
  + * @ant.role name="converter"
    */
   public interface Converter
   {
       /** Role String for interface */
  -    String ROLE = Converter.class.getName();
  +    String ROLE = "converter";
   
       /**
        * Convert original to destination type.
  
  
  
  1.4       +2 -2      jakarta-ant-myrmidon/aut/src/java/org/apache/aut/nativelib/ExecManager.java
  
  Index: ExecManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/nativelib/ExecManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ExecManager.java	1 Mar 2002 02:13:35 -0000	1.3
  +++ ExecManager.java	24 Apr 2002 02:20:59 -0000	1.4
  @@ -27,8 +27,8 @@
    * </ul>
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.3 $ $Date: 2002/03/01 02:13:35 $
  - * @ant:role shorthand="exec-manager"
  + * @version $Revision: 1.4 $ $Date: 2002/04/24 02:20:59 $
  + * @ant.role name="exec-manager"
    */
   public interface ExecManager
   {
  
  
  
  1.8       +2 -4      jakarta-ant-myrmidon/aut/src/java/org/apache/aut/vfs/FileSystemManager.java
  
  Index: FileSystemManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/vfs/FileSystemManager.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FileSystemManager.java	7 Apr 2002 02:27:55 -0000	1.7
  +++ FileSystemManager.java	24 Apr 2002 02:20:59 -0000	1.8
  @@ -50,14 +50,12 @@
    * </ul>
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.7 $ $Date: 2002/04/07 02:27:55 $
  + * @version $Revision: 1.8 $ $Date: 2002/04/24 02:20:59 $
    *
  - * @ant:role shorthand="file-system-manager"
  + * @ant.role name="file-system-manager"
    */
   public interface FileSystemManager
   {
  -    String ROLE = FileSystemManager.class.getName();
  -
       /**
        * Returns the base file used to resolve relative paths.
        */
  
  
  
  1.5       +3 -3      jakarta-ant-myrmidon/aut/src/java/org/apache/aut/vfs/provider/FileSystemProvider.java
  
  Index: FileSystemProvider.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/vfs/provider/FileSystemProvider.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FileSystemProvider.java	7 Apr 2002 02:27:56 -0000	1.4
  +++ FileSystemProvider.java	24 Apr 2002 02:20:59 -0000	1.5
  @@ -14,13 +14,13 @@
    * A file system provider, or factory.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.4 $ $Date: 2002/04/07 02:27:56 $
  + * @version $Revision: 1.5 $ $Date: 2002/04/24 02:20:59 $
    *
  - * @ant:role shorthand="file-system"
  + * @ant.role name="file-system"
    */
   public interface FileSystemProvider
   {
  -    String ROLE = FileSystemProvider.class.getName();
  +    String ROLE = "file-system";
   
       /**
        * Sets the context for this file system provider.  This method is called
  
  
  
  1.2       +3 -3      jakarta-ant-myrmidon/buildtools/src/java/org/apache/myrmidon/build/ant-roles.j
  
  Index: ant-roles.j
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/buildtools/src/java/org/apache/myrmidon/build/ant-roles.j,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ant-roles.j	15 Apr 2002 09:55:44 -0000	1.1
  +++ ant-roles.j	24 Apr 2002 02:20:59 -0000	1.2
  @@ -1,8 +1,8 @@
   <roles version="1.0">
       <XDtClass:forAllClasses abstract="true">
  -      <XDtClass:ifHasClassTag tagName="ant:role" superclasses="false">
  -        <role shorthand="<XDtClass:classTagValue tagName="ant:role" paramName="shorthand"/>"
  -              name="<XDtClass:fullClassName/>"/>
  +      <XDtClass:ifHasClassTag tagName="ant.role" superclasses="false">
  +        <role name="<XDtClass:classTagValue tagName="ant.role" paramName="name"/>"
  +              classname="<XDtClass:fullClassName/>"/>
         </XDtClass:ifHasClassTag>
       </XDtClass:forAllClasses>
   </roles>
  
  
  
  1.17      +1 -3      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/aspect/DefaultAspectManager.java
  
  Index: DefaultAspectManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/aspect/DefaultAspectManager.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- DefaultAspectManager.java	23 Apr 2002 07:32:33 -0000	1.16
  +++ DefaultAspectManager.java	24 Apr 2002 02:20:59 -0000	1.17
  @@ -12,8 +12,6 @@
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.logger.Logger;
  -import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.myrmidon.api.Task;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.api.metadata.ModelElement;
  @@ -25,7 +23,7 @@
    * Manage and propogate Aspects.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.16 $ $Date: 2002/04/23 07:32:33 $
  + * @version $Revision: 1.17 $ $Date: 2002/04/24 02:20:59 $
    */
   public class DefaultAspectManager
       implements AspectManager, Initializable
  
  
  
  1.49      +6 -6      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java
  
  Index: DefaultConfigurer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- DefaultConfigurer.java	21 Apr 2002 02:41:23 -0000	1.48
  +++ DefaultConfigurer.java	24 Apr 2002 02:20:59 -0000	1.49
  @@ -32,7 +32,7 @@
    * Class used to configure tasks.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.48 $ $Date: 2002/04/21 02:41:23 $
  + * @version $Revision: 1.49 $ $Date: 2002/04/24 02:20:59 $
    * @ant.type type="configurer" name="default"
    */
   public class DefaultConfigurer
  @@ -552,8 +552,8 @@
                   {
                       // Check the role name
                       final RoleInfo roleInfo =
  -                        m_roleManager.getRoleByType( propertyConfigurer.getType() );
  -                    if( roleInfo != null && name.equalsIgnoreCase( roleInfo.getShorthand() ) )
  +                        m_roleManager.getRoleByImplementationClass( propertyConfigurer.getType() );
  +                    if( roleInfo != null && name.equalsIgnoreCase( roleInfo.getName() ) )
                       {
                           return propertyConfigurer;
                       }
  @@ -572,10 +572,10 @@
       {
           // Map the expected type to a role.  If found, instantiate the default
           // type for that role
  -        final RoleInfo roleInfo = m_roleManager.getRoleByType( type );
  +        final RoleInfo roleInfo = m_roleManager.getRoleByImplementationClass( type );
           if( roleInfo != null )
           {
  -            final String typeName = roleInfo.getDefaultType();
  +            final String typeName = roleInfo.getDefaultTypeName();
               if( typeName != null )
               {
                   // Create the instance
  @@ -604,7 +604,7 @@
       {
           // Map the expected type to a role.  If found, attempt to create
           // an instance
  -        final RoleInfo roleInfo = m_roleManager.getRoleByType( type );
  +        final RoleInfo roleInfo = m_roleManager.getRoleByImplementationClass( type );
           if( roleInfo != null )
           {
               final TypeFactory factory = m_typeManager.getFactory( roleInfo.getName() );
  
  
  
  1.37      +9 -26     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/deployer/DefaultDeployer.java
  
  Index: DefaultDeployer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/deployer/DefaultDeployer.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- DefaultDeployer.java	3 Apr 2002 10:58:19 -0000	1.36
  +++ DefaultDeployer.java	24 Apr 2002 02:20:59 -0000	1.37
  @@ -36,7 +36,7 @@
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.36 $ $Date: 2002/04/03 10:58:19 $
  + * @version $Revision: 1.37 $ $Date: 2002/04/24 02:20:59 $
    */
   public class DefaultDeployer
       extends AbstractLogEnabled
  @@ -145,8 +145,7 @@
                                  final ServiceDefinition definition )
           throws Exception
       {
  -        final String roleShorthand = definition.getRoleShorthand();
  -        final String roleName = getRole( roleShorthand ).getName();
  +        final String roleName = definition.getRole();
           final String factoryClassName = definition.getFactoryClass();
           handleType( deployment, ServiceFactory.ROLE, roleName, factoryClassName );
       }
  @@ -159,7 +158,7 @@
           throws Exception
       {
           final String typeName = typeDef.getName();
  -        final String roleShorthand = typeDef.getRole();
  +        final String roleName = typeDef.getRole();
   
           final String className = typeDef.getClassname();
           if( null == className )
  @@ -191,7 +190,7 @@
           else
           {
               // Validate the definition
  -            if( null == roleShorthand )
  +            if( null == roleName )
               {
                   final String message = REZ.getString( "typedef.no-role.error" );
                   throw new DeploymentException( message );
  @@ -203,13 +202,12 @@
               }
   
               // Deploy general-purpose type
  -            final String roleName = getRole( roleShorthand ).getName();
               handleType( deployment, roleName, typeName, className );
   
               if( getLogger().isDebugEnabled() )
               {
                   final String message =
  -                    REZ.getString( "register-type.notice", roleShorthand, typeName );
  +                    REZ.getString( "register-type.notice", roleName, typeName );
                   getLogger().debug( message );
               }
           }
  @@ -259,31 +257,16 @@
                               final RoleDefinition roleDef )
           throws Exception
       {
  -        final String name = roleDef.getShortHand();
           final String role = roleDef.getRoleName();
  -        final Class type = deployment.getClassLoader().loadClass( role );
  -        final RoleInfo roleInfo = new RoleInfo( role, name, type, null );
  +        final String className = roleDef.getClassName();
  +        final Class type = deployment.getClassLoader().loadClass( className );
  +        final RoleInfo roleInfo = new RoleInfo( role, type, null );
           m_roleManager.addRole( roleInfo );
   
           if( getLogger().isDebugEnabled() )
           {
  -            final String debugMessage = REZ.getString( "register-role.notice", role, name );
  +            final String debugMessage = REZ.getString( "register-role.notice", role, className );
               getLogger().debug( debugMessage );
           }
  -    }
  -
  -    /**
  -     * Locates a role, from its shorthand.
  -     */
  -    private RoleInfo getRole( final String roleShorthand )
  -        throws DeploymentException
  -    {
  -        final RoleInfo roleInfo = m_roleManager.getRoleByShorthandName( roleShorthand );
  -        if( null == roleInfo )
  -        {
  -            final String message = REZ.getString( "unknown-role4name.error", roleShorthand );
  -            throw new DeploymentException( message );
  -        }
  -        return roleInfo;
       }
   }
  
  
  
  1.13      +1 -2      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/deployer/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/deployer/Resources.properties,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Resources.properties	21 Apr 2002 02:06:25 -0000	1.12
  +++ Resources.properties	24 Apr 2002 02:20:59 -0000	1.13
  @@ -1,6 +1,6 @@
   register-converter.notice=Registered converter that converts from {0} to {1}.
   register-type.notice=Registered type {0}/{1}.
  -register-role.notice=Registered role {0} with shorthand name {1}.
  +register-role.notice=Registered role {0} with class name {1}.
   url-deploy-types.notice=Registering types from "{0}".
   url-deploy-roles.notice=Registering roles from "{0}".
   url-deploy-services.notice=Registering services from "{0}".
  @@ -12,7 +12,6 @@
   deploy-services.error=Could not register services from "{0}".
   deploy-converter.error=Could not register converter that converts from {0} to {1}.
   deploy-type.error=Could not register type {0}/{1}.
  -unknown-role4name.error=Unknown role "{0}".
   typedef.no-classname.error=Must specify the classname parameter.
   typedef.no-name.error=Must specify name parameter.
   typedef.no-role.error=Must specify type parameter.
  
  
  
  1.2       +5 -5      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/deployer/RoleDefinition.java
  
  Index: RoleDefinition.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/deployer/RoleDefinition.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RoleDefinition.java	10 Feb 2002 02:34:13 -0000	1.1
  +++ RoleDefinition.java	24 Apr 2002 02:20:59 -0000	1.2
  @@ -14,14 +14,14 @@
    */
   class RoleDefinition
   {
  +    private final String m_className;
       private final String m_roleName;
  -    private final String m_shortHand;
   
       public RoleDefinition( final String roleName,
  -                           final String shortHand )
  +                           final String className )
       {
           m_roleName = roleName;
  -        m_shortHand = shortHand;
  +        m_className = className;
       }
   
       public String getRoleName()
  @@ -29,8 +29,8 @@
           return m_roleName;
       }
   
  -    public String getShortHand()
  +    public String getClassName()
       {
  -        return m_shortHand;
  +        return m_className;
       }
   }
  
  
  
  1.6       +4 -4      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/deployer/RoleDescriptorBuilder.java
  
  Index: RoleDescriptorBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/deployer/RoleDescriptorBuilder.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RoleDescriptorBuilder.java	21 Apr 2002 02:06:25 -0000	1.5
  +++ RoleDescriptorBuilder.java	24 Apr 2002 02:20:59 -0000	1.6
  @@ -17,7 +17,7 @@
    * Builds typelib role descriptors.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.5 $ $Date: 2002/04/21 02:06:25 $
  + * @version $Revision: 1.6 $ $Date: 2002/04/24 02:20:59 $
    */
   class RoleDescriptorBuilder
       implements DescriptorBuilder
  @@ -54,9 +54,9 @@
               for( int i = 0; i < types.length; i++ )
               {
                   final Configuration type = types[ i ];
  -                final String name = type.getAttribute( "shorthand" );
  -                final String role = type.getAttribute( "name" );
  -                final RoleDefinition roleDef = new RoleDefinition( role, name );
  +                final String roleName = type.getAttribute( "name" );
  +                final String className = type.getAttribute( "classname" );
  +                final RoleDefinition roleDef = new RoleDefinition( roleName, className );
                   descriptor.addDefinition( roleDef );
               }
   
  
  
  
  1.2       +8 -8      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/deployer/ServiceDefinition.java
  
  Index: ServiceDefinition.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/deployer/ServiceDefinition.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServiceDefinition.java	12 Feb 2002 10:40:08 -0000	1.1
  +++ ServiceDefinition.java	24 Apr 2002 02:20:59 -0000	1.2
  @@ -13,29 +13,29 @@
    * A service definition.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/02/12 10:40:08 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/24 02:20:59 $
    */
   class ServiceDefinition
   {
  -    private final String m_roleShorthand;
  +    private final String m_role;
       private final String m_factoryClass;
       private final Configuration m_config;
   
  -    public ServiceDefinition( final String roleShorthand,
  -                              final String factoryClass,
  +    public ServiceDefinition( final String roleName,
  +                              final String factoryClassName,
                                 final Configuration config )
       {
  -        m_roleShorthand = roleShorthand;
  -        m_factoryClass = factoryClass;
  +        m_role = roleName;
  +        m_factoryClass = factoryClassName;
           m_config = config;
       }
   
       /**
        * Returns the role that the service implements.
        */
  -    public String getRoleShorthand()
  +    public String getRole()
       {
  -        return m_roleShorthand;
  +        return m_role;
       }
   
       /**
  
  
  
  1.7       +3 -3      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/deployer/ServiceDescriptorBuilder.java
  
  Index: ServiceDescriptorBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/deployer/ServiceDescriptorBuilder.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ServiceDescriptorBuilder.java	21 Apr 2002 02:06:25 -0000	1.6
  +++ ServiceDescriptorBuilder.java	24 Apr 2002 02:20:59 -0000	1.7
  @@ -17,7 +17,7 @@
    * Builds typelib service descriptors.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.6 $ $Date: 2002/04/21 02:06:25 $
  + * @version $Revision: 1.7 $ $Date: 2002/04/24 02:20:59 $
    */
   class ServiceDescriptorBuilder
       implements DescriptorBuilder
  @@ -54,10 +54,10 @@
               for( int i = 0; i < elements.length; i++ )
               {
                   final Configuration element = elements[ i ];
  -                final String roleShorthand = element.getName();
  +                final String roleName = element.getName();
                   final String factoryClassName = element.getAttribute( "factory" );
                   final ServiceDefinition definition =
  -                    new ServiceDefinition( roleShorthand, factoryClassName, model );
  +                    new ServiceDefinition( roleName, factoryClassName, model );
                   descriptor.addDefinition( definition );
               }
   
  
  
  
  1.12      +11 -48    jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/role/DefaultRoleManager.java
  
  Index: DefaultRoleManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/role/DefaultRoleManager.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DefaultRoleManager.java	29 Mar 2002 12:56:04 -0000	1.11
  +++ DefaultRoleManager.java	24 Apr 2002 02:21:00 -0000	1.12
  @@ -18,7 +18,7 @@
    * Interface to manage roles and mapping to names.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version CVS $Revision: 1.11 $ $Date: 2002/03/29 12:56:04 $
  + * @version CVS $Revision: 1.12 $ $Date: 2002/04/24 02:21:00 $
    */
   public class DefaultRoleManager
       implements RoleManager
  @@ -29,13 +29,10 @@
       /** Parent <code>RoleManager</code> for nested resolution */
       private final RoleManager m_parent;
   
  -    /** Map from shorthand name -> RoleInfo. */
  -    private final HashMap m_shorthandMap = new HashMap();
  -
       /** Map from role name -> RoleInfo. */
       private final HashMap m_nameMap = new HashMap();
   
  -    /** Map from role type -> RoleInfo. */
  +    /** Map from role impl class -> RoleInfo. */
       private final HashMap m_typeMap = new HashMap();
   
       /**
  @@ -58,36 +55,18 @@
       }
   
       /**
  -     * Find role based on shorthand name.
  -     *
  -     * @param name the shorthand name
  -     * @return the role, or null if the role cannot be found.
  -     */
  -    public RoleInfo getRoleByShorthandName( final String name )
  -    {
  -        final RoleInfo role = (RoleInfo)m_shorthandMap.get( name );
  -
  -        if( null == role && null != m_parent )
  -        {
  -            return m_parent.getRoleByShorthandName( name );
  -        }
  -
  -        return role;
  -    }
  -
  -    /**
        * Find role based on role type.
        *
        * @param type the role type.
        * @return the role, or null if the role cannot be found.
        */
  -    public RoleInfo getRoleByType( final Class type )
  +    public RoleInfo getRoleByImplementationClass( final Class type )
       {
           final RoleInfo role = (RoleInfo)m_typeMap.get( type );
   
           if( null == role && null != m_parent )
           {
  -            return m_parent.getRoleByType( type );
  +            return m_parent.getRoleByImplementationClass( type );
           }
   
           return role;
  @@ -125,39 +104,23 @@
               throw new RoleException( message );
           }
   
  -        // Check for duplicate shorthand names
  -        final String shorthand = role.getShorthand();
  -        if( shorthand != null )
  +        // Check for duplicate implementation classes
  +        final Class roleImplClass = role.getImplementationClass();
  +        if( roleImplClass != null )
           {
  -            oldRole = (RoleInfo)m_shorthandMap.get( shorthand );
  +            oldRole = (RoleInfo)m_typeMap.get( roleImplClass );
               if( null != oldRole && !oldRole.equals( role ) )
               {
  -                final String message = REZ.getString( "duplicate-shorthand.error", shorthand );
  -                throw new RoleException( message );
  -            }
  -        }
  -
  -        // Check for duplicate types
  -        final Class roleType = role.getType();
  -        if( roleType != null )
  -        {
  -            oldRole = (RoleInfo)m_typeMap.get( roleType );
  -            if( null != oldRole && !oldRole.equals( role ) )
  -            {
  -                final String message = REZ.getString( "duplicate-type.error", roleType.getName() );
  +                final String message = REZ.getString( "duplicate-type.error", roleImplClass.getName() );
                   throw new RoleException( message );
               }
           }
   
           // Add the role to the maps
           m_nameMap.put( roleName, role );
  -        if( shorthand != null )
  -        {
  -            m_shorthandMap.put( shorthand, role );
  -        }
  -        if( roleType != null )
  +        if( roleImplClass != null )
           {
  -            m_typeMap.put( roleType, role );
  +            m_typeMap.put( roleImplClass, role );
           }
       }
   }
  
  
  
  1.3       +1 -2      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/role/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/role/Resources.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Resources.properties	21 Feb 2002 12:52:07 -0000	1.2
  +++ Resources.properties	24 Apr 2002 02:21:00 -0000	1.3
  @@ -1,3 +1,2 @@
  -duplicate-shorthand.error=Duplicate roles with shorthand name "{0}".
  -duplicate-type.error=Duplicate roles with type "{0}".
  +duplicate-type.error=Duplicate roles with implementation class "{0}".
   duplicate-role.error=Duplicate roles with name "{0}".
  
  
  
  1.6       +2 -2      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/service/InstantiatingServiceManager.java
  
  Index: InstantiatingServiceManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/service/InstantiatingServiceManager.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- InstantiatingServiceManager.java	9 Apr 2002 07:21:12 -0000	1.5
  +++ InstantiatingServiceManager.java	24 Apr 2002 02:21:00 -0000	1.6
  @@ -49,7 +49,7 @@
    * </ul>
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.5 $ $Date: 2002/04/09 07:21:12 $
  + * @version $Revision: 1.6 $ $Date: 2002/04/24 02:21:00 $
    */
   public class InstantiatingServiceManager
       extends AbstractLogEnabled
  @@ -197,7 +197,7 @@
   
               // Check the service is assignable to the role type
               final RoleInfo roleInfo = m_roleManager.getRole( serviceRole );
  -            final Class serviceType = roleInfo.getType();
  +            final Class serviceType = roleInfo.getImplementationClass();
               if( serviceType != null && !serviceType.isInstance( service ) )
               {
                   final String message = REZ.getString( "mismatched-service-type.error",
  
  
  
  1.20      +2 -2      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java
  
  Index: DefaultTypeManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- DefaultTypeManager.java	29 Mar 2002 12:56:04 -0000	1.19
  +++ DefaultTypeManager.java	24 Apr 2002 02:21:00 -0000	1.20
  @@ -23,7 +23,7 @@
    * The interface that is used to manage types.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.19 $ $Date: 2002/03/29 12:56:04 $
  + * @version $Revision: 1.20 $ $Date: 2002/04/24 02:21:00 $
    */
   public class DefaultTypeManager
       implements TypeManager, Serviceable
  @@ -117,7 +117,7 @@
                   final String message = REZ.getString( "unknown-role.error", roleName );
                   throw new TypeException( message );
               }
  -            factory = new MultiSourceTypeFactory( role.getType() );
  +            factory = new MultiSourceTypeFactory( role.getImplementationClass() );
           }
   
           m_roleMap.put( roleName, factory );
  
  
  
  1.39      +33 -10    jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java
  
  Index: DefaultTaskContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- DefaultTaskContext.java	23 Apr 2002 07:24:11 -0000	1.38
  +++ DefaultTaskContext.java	24 Apr 2002 02:21:00 -0000	1.39
  @@ -19,12 +19,14 @@
   import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
   import org.apache.myrmidon.interfaces.property.PropertyResolver;
   import org.apache.myrmidon.interfaces.property.PropertyStore;
  +import org.apache.myrmidon.interfaces.role.RoleManager;
  +import org.apache.myrmidon.interfaces.role.RoleInfo;
   
   /**
    * Default implementation of TaskContext.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.38 $ $Date: 2002/04/23 07:24:11 $
  + * @version $Revision: 1.39 $ $Date: 2002/04/24 02:21:00 $
    */
   public class DefaultTaskContext
       implements TaskContext
  @@ -79,23 +81,44 @@
       public Object getService( final Class serviceClass )
           throws TaskException
       {
  -        final String name = serviceClass.getName();
  -        //Note that this will chain up to parent ServiceManagers (if any)
  +        final String serviceClassName = serviceClass.getName();
           final ServiceManager serviceManager = m_frame.getServiceManager();
  -        if( null != serviceManager && serviceManager.hasService( name ) )
  +
  +        if( serviceManager != null )
           {
               try
               {
  -                return serviceManager.lookup( name );
  +                // Map the service class to the role name for that service
  +                final RoleManager roleManager = (RoleManager)serviceManager.lookup( RoleManager.ROLE );
  +                final RoleInfo roleInfo = roleManager.getRoleByImplementationClass( serviceClass );
  +
  +                // If the role is not found, use the classname
  +                final String roleName;
  +                if( roleInfo != null )
  +                {
  +                    roleName = roleInfo.getName();
  +                }
  +                else
  +                {
  +                    roleName = serviceClassName;
  +                }
  +
  +                // Lookup the service by role name.  Note that this will chain
  +                // up to parent ServiceManagers (if any)
  +                if( serviceManager.hasService( roleName ) )
  +                {
  +                    return serviceManager.lookup( roleName );
  +                }
               }
  -            catch( final ServiceException se )
  +            catch( final ServiceException e )
               {
  -                throw new TaskException( se.getMessage(), se );
  +                final String message = REZ.getString( "bad-find-service.error", serviceClassName );
  +                throw new TaskException( message, e );
               }
           }
   
           // Not found
  -        final String message = REZ.getString( "bad-find-service.error", name );
  +        final String message = REZ.getString( "bad-find-service.error", serviceClassName );
           throw new TaskException( message );
       }
   
  @@ -129,7 +152,7 @@
           try
           {
               final PropertyResolver propertyResolver =
  -                (PropertyResolver)getService( PropertyResolver.class );
  +                (PropertyResolver)m_frame.getServiceManager().lookup( PropertyResolver.ROLE );
               final Object object =
                   propertyResolver.resolveProperties( value, this );
               if( null == object )
  @@ -140,7 +163,7 @@
   
               return object;
           }
  -        catch( final TaskException te )
  +        catch( final Exception te )
           {
               final String message = REZ.getString( "bad-resolve.error", value );
               throw new TaskException( message, te );
  
  
  
  1.12      +3 -3      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/builder/ProjectBuilder.java
  
  Index: ProjectBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/builder/ProjectBuilder.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ProjectBuilder.java	1 Apr 2002 09:56:26 -0000	1.11
  +++ ProjectBuilder.java	24 Apr 2002 02:21:00 -0000	1.12
  @@ -13,13 +13,13 @@
    * Interface implemented by components that build projects from sources.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.11 $ $Date: 2002/04/01 09:56:26 $
  - * @ant:role shorthand="project-builder"
  + * @version $Revision: 1.12 $ $Date: 2002/04/24 02:21:00 $
  + * @ant.role name="project-builder"
    */
   public interface ProjectBuilder
   {
       /** Role name for this interface. */
  -    String ROLE = ProjectBuilder.class.getName();
  +    String ROLE = "project-builder";
   
       /**
        * build a project from source.
  
  
  
  1.14      +3 -3      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/configurer/Configurer.java
  
  Index: Configurer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/configurer/Configurer.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Configurer.java	21 Apr 2002 02:01:49 -0000	1.13
  +++ Configurer.java	24 Apr 2002 02:21:00 -0000	1.14
  @@ -15,13 +15,13 @@
    * Class used to configure tasks.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.13 $ $Date: 2002/04/21 02:01:49 $
  - * @ant:role shorthand="configurer"
  + * @version $Revision: 1.14 $ $Date: 2002/04/24 02:21:00 $
  + * @ant.role name="configurer"
    */
   public interface Configurer
   {
       /** Role name for this interface. */
  -    String ROLE = Configurer.class.getName();
  +    String ROLE = "configurer";
   
       /**
        * Configure an object based on a configuration in a particular context.
  
  
  
  1.5       +4 -2      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/deployer/ConverterDefinition.java
  
  Index: ConverterDefinition.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/deployer/ConverterDefinition.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ConverterDefinition.java	1 Apr 2002 09:56:27 -0000	1.4
  +++ ConverterDefinition.java	24 Apr 2002 02:21:00 -0000	1.5
  @@ -7,11 +7,13 @@
    */
   package org.apache.myrmidon.interfaces.deployer;
   
  +import org.apache.aut.converter.Converter;
  +
   /**
    * A specialised TypeDefinition which defines a converter.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.4 $ $Date: 2002/04/01 09:56:27 $
  + * @version $Revision: 1.5 $ $Date: 2002/04/24 02:21:00 $
    */
   public class ConverterDefinition
       extends TypeDefinition
  @@ -29,7 +31,7 @@
                                   final String sourceType,
                                   final String destinationType )
       {
  -        super( className, "converter", className );
  +        super( className, Converter.ROLE, className );
           m_sourceType = sourceType;
           m_destinationType = destinationType;
       }
  
  
  
  1.5       +4 -4      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/deployer/TypeDefinition.java
  
  Index: TypeDefinition.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/deployer/TypeDefinition.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TypeDefinition.java	1 Apr 2002 09:56:27 -0000	1.4
  +++ TypeDefinition.java	24 Apr 2002 02:21:00 -0000	1.5
  @@ -11,7 +11,7 @@
    * A general-purpose type definition.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.4 $ $Date: 2002/04/01 09:56:27 $
  + * @version $Revision: 1.5 $ $Date: 2002/04/24 02:21:00 $
    */
   public class TypeDefinition
   {
  @@ -22,15 +22,15 @@
       /**
        * Creates a TypeDefinition
        * @param name the name of the type
  -     * @param roleShorthand the name of the role played by this type
  +     * @param role the name of the role of this type
        * @param className the name of the class implementing this type
        */
       public TypeDefinition( final String name,
  -                           final String roleShorthand,
  +                           final String role,
                              final String className )
       {
           m_name = name;
  -        m_role = roleShorthand;
  +        m_role = role;
           m_classname = className;
       }
   
  
  
  
  1.8       +3 -3      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/property/PropertyResolver.java
  
  Index: PropertyResolver.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/property/PropertyResolver.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PropertyResolver.java	9 Apr 2002 02:26:35 -0000	1.7
  +++ PropertyResolver.java	24 Apr 2002 02:21:00 -0000	1.8
  @@ -16,14 +16,14 @@
    * String content.
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.7 $ $Date: 2002/04/09 02:26:35 $
  + * @version $Revision: 1.8 $ $Date: 2002/04/24 02:21:00 $
    *
  - * @ant:role shorthand="property-resolver"
  + * @ant.role name="property-resolver"
    */
   public interface PropertyResolver
   {
       /** Role name for this interface. */
  -    String ROLE = PropertyResolver.class.getName();
  +    String ROLE = "property-resolver";
   
       /**
        * Resolve a string property. This evaluates all property
  
  
  
  1.5       +13 -58    jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/role/RoleInfo.java
  
  Index: RoleInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/role/RoleInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RoleInfo.java	1 Apr 2002 09:56:27 -0000	1.4
  +++ RoleInfo.java	24 Apr 2002 02:21:00 -0000	1.5
  @@ -11,73 +11,46 @@
    * A role definition.  Role definitions are immutable.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.4 $ $Date: 2002/04/01 09:56:27 $
  + * @version $Revision: 1.5 $ $Date: 2002/04/24 02:21:00 $
    */
   public final class RoleInfo
   {
       private final String m_name;
  -    private final String m_shorthand;
       private final Class m_type;
       private final String m_defaultType;
   
       /**
        * Creates a role definition.
        *
  -     *
  -     * Same as calling <code>RoleInfo( name, null, null, null )</code>
  -     * @see #RoleInfo( String, String, Class, String )
  +     * @see #RoleInfo( String, Class, String )
        */
       public RoleInfo( final String name )
       {
  -        this( name, null, null, null );
  +        this( name, null, null );
       }
   
       /**
        * Creates a role definition.
        *
  -     * Same as calling <code>RoleInfo( name, shorthand, null, null )</code>
  -     * @see #RoleInfo( String, String, Class, String )
  +     * @see #RoleInfo( String, Class, String )
        */
  -    public RoleInfo( final String name, final String shorthand )
  +    public RoleInfo( final String name, final Class type )
       {
  -        this( name, shorthand, null, null );
  +        this( name, type, null );
       }
   
       /**
        * Creates a role definition.
  -     * Same as calling <code>RoleInfo( name, shorthand, type, null )</code>
  -     * @see #RoleInfo( String, String, Class, String )
  -     */
  -    public RoleInfo( final String name, final String shorthand, final Class type )
  -    {
  -        this( name, shorthand, type, null );
  -    }
  -
  -    /**
  -     * Creates a role definition.  The role type's fully-qualified name
  -     * is used as the role name.
        *
  -     * @see #RoleInfo( String, String, Class, String )
  -     */
  -    public RoleInfo( final String shorthand, final Class type )
  -    {
  -        this( type.getName(), shorthand, type, null );
  -    }
  -
  -    /**
  -     * Creates a role definition.
        * @param name The role name.
  -     * @param shorthand The role shorthand name.  May be null.
  -     * @param type The role type.  May be null.
  -     * @param defaultType The default type to use. May be null.
  +     * @param type The role implementation class.  May be null.
  +     * @param defaultType The default type name to use. May be null.
        */
       public RoleInfo( final String name,
  -                     final String shorthand,
                        final Class type,
                        final String defaultType )
       {
           m_name = name;
  -        m_shorthand = shorthand;
           m_type = type;
           m_defaultType = defaultType;
       }
  @@ -97,14 +70,6 @@
           {
               return false;
           }
  -        if( m_shorthand == null && role.m_shorthand != null )
  -        {
  -            return false;
  -        }
  -        if( m_shorthand != null && !m_shorthand.equals( role.m_shorthand ) )
  -        {
  -            return false;
  -        }
           if( m_type != role.m_type )
           {
               return false;
  @@ -122,22 +87,12 @@
       }
   
       /**
  -     * Returns this role's shorthand name.
  -     *
  -     * @return The shorthand name, or null if this role has none.
  -     */
  -    public String getShorthand()
  -    {
  -        return m_shorthand;
  -    }
  -
  -    /**
  -     * Returns this role's type.  All implementations of this role must be
  -     * assignable to this type.
  +     * Returns the Java class for this role.  All implementations of this
  +     * role must be assignable to this class.
        *
  -     * @return The role type, or null if this role has no type.
  +     * @return The role class, or null if this role has no type.
        */
  -    public Class getType()
  +    public Class getImplementationClass()
       {
           return m_type;
       }
  @@ -147,7 +102,7 @@
        *
        * @return The default type name, or null if this role has no default type.
        */
  -    public String getDefaultType()
  +    public String getDefaultTypeName()
       {
           return m_defaultType;
       }
  
  
  
  1.10      +3 -11     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/role/RoleManager.java
  
  Index: RoleManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/role/RoleManager.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- RoleManager.java	1 Apr 2002 09:56:27 -0000	1.9
  +++ RoleManager.java	24 Apr 2002 02:21:00 -0000	1.10
  @@ -15,7 +15,7 @@
    * @author <a href="mailto:giacomo@apache,org">Giacomo Pati</a>
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version CVS $Revision: 1.9 $ $Date: 2002/04/01 09:56:27 $
  + * @version CVS $Revision: 1.10 $ $Date: 2002/04/24 02:21:00 $
    */
   public interface RoleManager
   {
  @@ -23,20 +23,12 @@
       String ROLE = RoleManager.class.getName();
   
       /**
  -     * Find role based on shorthand name.
  -     *
  -     * @param name the shorthand name
  -     * @return the role, or null if the role cannot be found.
  -     */
  -    RoleInfo getRoleByShorthandName( String name );
  -
  -    /**
  -     * Find role based on role type.
  +     * Find role based on role implementation class.
        *
        * @param type the role type.
        * @return the role, or null if the role cannot be found.
        */
  -    RoleInfo getRoleByType( Class type );
  +    RoleInfo getRoleByImplementationClass( Class type );
   
       /**
        * Find role based on name.
  
  
  
  1.6       +3 -3      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/service/ServiceFactory.java
  
  Index: ServiceFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/service/ServiceFactory.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ServiceFactory.java	1 Apr 2002 09:56:27 -0000	1.5
  +++ ServiceFactory.java	24 Apr 2002 02:21:00 -0000	1.6
  @@ -13,14 +13,14 @@
    * preparing the service for use.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.5 $ $Date: 2002/04/01 09:56:27 $
  + * @version $Revision: 1.6 $ $Date: 2002/04/24 02:21:00 $
    *
  - * @ant:role shorthand="service-factory"
  + * @ant.role name="service-factory"
    */
   public interface ServiceFactory
   {
       /** Role name for this interface. */
  -    String ROLE = ServiceFactory.class.getName();
  +    String ROLE = "service-factory";
   
       /**
        * Create a service that corresponds to this factory.
  
  
  
  1.26      +4 -4      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/AbstractComponentTest.java
  
  Index: AbstractComponentTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/AbstractComponentTest.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- AbstractComponentTest.java	18 Apr 2002 12:53:15 -0000	1.25
  +++ AbstractComponentTest.java	24 Apr 2002 02:21:00 -0000	1.26
  @@ -50,7 +50,7 @@
    * A base class for tests for the default components.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.25 $ $Date: 2002/04/18 12:53:15 $
  + * @version $Revision: 1.26 $ $Date: 2002/04/24 02:21:00 $
    */
   public abstract class AbstractComponentTest
       extends AbstractContainerTestCase
  @@ -164,9 +164,9 @@
               // Register some standard roles
               // Add some core roles
               final RoleManager roleManager = (RoleManager)getServiceManager().lookup( RoleManager.ROLE );
  -            roleManager.addRole( new RoleInfo( TestDataType.ROLE, DATA_TYPE_ROLE, TestDataType.class ) );
  -            roleManager.addRole( new RoleInfo( Converter.ROLE, CONVERTER_ROLE, Converter.class ) );
  -            roleManager.addRole( new RoleInfo( ServiceFactory.ROLE, SERVICE_FACTORY_ROLE, ServiceFactory.class ) );
  +            roleManager.addRole( new RoleInfo( TestDataType.ROLE, TestDataType.class ) );
  +            roleManager.addRole( new RoleInfo( Converter.ROLE, Converter.class ) );
  +            roleManager.addRole( new RoleInfo( ServiceFactory.ROLE, ServiceFactory.class ) );
           }
   
           return m_serviceManager;
  
  
  
  1.2       +1 -2      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/TestDataType.java
  
  Index: TestDataType.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/TestDataType.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestDataType.java	11 Apr 2002 12:58:58 -0000	1.1
  +++ TestDataType.java	24 Apr 2002 02:21:00 -0000	1.2
  @@ -12,9 +12,8 @@
    * as stand alone data types.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @ant:role shorthand="data-type"
    */
   public interface TestDataType
   {
  -    String ROLE = TestDataType.class.getName();
  +    String ROLE = "data-type";
   }
  
  
  
  1.11      +12 -6     jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/DefaultConfigurerTestCase.java
  
  Index: DefaultConfigurerTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/DefaultConfigurerTestCase.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DefaultConfigurerTestCase.java	23 Apr 2002 06:24:19 -0000	1.10
  +++ DefaultConfigurerTestCase.java	24 Apr 2002 02:21:00 -0000	1.11
  @@ -38,9 +38,13 @@
   import org.apache.myrmidon.components.configurer.test.data.ConfigTestTypedAdderRole;
   import org.apache.myrmidon.components.configurer.test.data.ConfigTestTypedConfigAdder;
   import org.apache.myrmidon.components.workspace.DefaultTaskContext;
  +import org.apache.myrmidon.components.workspace.DefaultExecutionFrame;
   import org.apache.myrmidon.components.TestDataType;
  +import org.apache.myrmidon.components.event.DefaultTaskEventManager;
   import org.apache.myrmidon.interfaces.configurer.Configurer;
   import org.apache.myrmidon.interfaces.role.RoleInfo;
  +import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
  +import org.apache.myrmidon.interfaces.event.TaskEventManager;
   
   /**
    * Test cases for the default configurer and related classes.
  @@ -74,8 +78,10 @@
   
           // Setup a context
           final DefaultPropertyStore store = new DefaultPropertyStore();
  -        m_context =
  -            new DefaultTaskContext( getServiceManager(), getLogger(), store );
  +        final TaskEventManager eventManager = new DefaultTaskEventManager();
  +        final ExecutionFrame frame
  +            = new DefaultExecutionFrame( "/", getLogger(), store, getServiceManager(), eventManager );
  +        m_context = new DefaultTaskContext( frame );
           final File baseDir = new File( "." ).getAbsoluteFile();
           m_context.setProperty( TaskContext.BASE_DIRECTORY, baseDir );
       }
  @@ -415,7 +421,7 @@
           final ModelElement child = new ModelElement( "prop-a", "test" );
           config.addChild( child );
   
  -        registerRole( new RoleInfo( "myrole1", null, MyRole1.class, "default-type" ) );
  +        registerRole( new RoleInfo( "myrole1", MyRole1.class, "default-type" ) );
           registerType( "myrole1", "default-type", MyType1.class );
   
           final ConfigTestInterfaceAdder test = new ConfigTestInterfaceAdder();
  @@ -472,7 +478,7 @@
           config.addChild( child1 );
           config.addChild( child2 );
   
  -        registerRole( new RoleInfo( MyRole1.ROLE, "my-role1", MyRole1.class ) );
  +        registerRole( new RoleInfo( MyRole1.ROLE, MyRole1.class ) );
           registerType( MyRole1.ROLE, "my-type1", MyType1.class );
           registerType( MyRole1.ROLE, "my-type2", MyType2.class );
   
  @@ -499,7 +505,7 @@
           config.addChild( child1 );
   
           // Register incompatible types with the same name, as data-type and myrole1.
  -        registerRole( new RoleInfo( "myrole1", "myrole1", MyRole1.class ) );
  +        registerRole( new RoleInfo( "myrole1", MyRole1.class ) );
           registerType( "myrole1", "my-type1", MyType1.class );
           registerType( TestDataType.ROLE, "my-type1", StringBuffer.class );
   
  @@ -685,7 +691,7 @@
   
           registerConverter( ObjectToMyRole1Converter.class, String.class, MyRole1.class );
           registerConverter( StringToIntegerConverter.class, String.class, Integer.class );
  -        registerRole( new RoleInfo( MyRole1.ROLE, "myrole1", MyRole1.class ) );
  +        registerRole( new RoleInfo( MyRole1.ROLE, MyRole1.class ) );
           registerType( MyRole1.ROLE, "my-type1", MyType1.class );
   
           final ConfigTestIgnoreStringMethods test = new ConfigTestIgnoreStringMethods();
  
  
  
  1.3       +2 -2      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/MyRole1.java
  
  Index: MyRole1.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/MyRole1.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MyRole1.java	11 Apr 2002 12:58:58 -0000	1.2
  +++ MyRole1.java	24 Apr 2002 02:21:01 -0000	1.3
  @@ -13,10 +13,10 @@
    * A basic interface to test configurer.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/11 12:58:58 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/24 02:21:01 $
    */
   public interface MyRole1
       extends TestDataType
   {
  -    String ROLE = MyRole1.class.getName();
  +    String ROLE = "myrole1";
   }
  
  
  
  1.2       +1 -1      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/deployer/test/TestRole1.java
  
  Index: TestRole1.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/deployer/test/TestRole1.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestRole1.java	17 Mar 2002 08:07:09 -0000	1.1
  +++ TestRole1.java	24 Apr 2002 02:21:01 -0000	1.2
  @@ -14,5 +14,5 @@
    */
   public interface TestRole1
   {
  -    String ROLE = TestRole1.class.getName();
  +    String ROLE = "test-role1";
   }
  
  
  
  1.2       +1 -1      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/deployer/test/ant-roles.xml
  
  Index: ant-roles.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/deployer/test/ant-roles.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ant-roles.xml	17 Mar 2002 08:07:09 -0000	1.1
  +++ ant-roles.xml	24 Apr 2002 02:21:01 -0000	1.2
  @@ -1,4 +1,4 @@
   <roles version="1.0">
       <!-- A custom role -->
  -    <role shorthand="test-role1" name="org.apache.myrmidon.components.deployer.test.TestRole1"/>
  +    <role name="test-role1" classname="org.apache.myrmidon.components.deployer.test.TestRole1"/>
   </roles>
  
  
  
  1.3       +18 -48    jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/role/test/DefaultRoleManagerTestCase.java
  
  Index: DefaultRoleManagerTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/role/test/DefaultRoleManagerTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultRoleManagerTestCase.java	18 Apr 2002 12:53:15 -0000	1.2
  +++ DefaultRoleManagerTestCase.java	24 Apr 2002 02:21:01 -0000	1.3
  @@ -19,7 +19,7 @@
    * Test cases for the DefaultRoleManager.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/18 12:53:15 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/24 02:21:01 $
    */
   public class DefaultRoleManagerTestCase
       extends AbstractContainerTestCase
  @@ -45,32 +45,24 @@
       public void testLookup() throws Exception
       {
           final String roleName = "role-name";
  -        final String shorthand = "role-shorthand";
  -        final RoleInfo origRole = new RoleInfo( roleName, shorthand, Task.class );
  +        final Class roleType = Task.class;
  +        final RoleInfo origRole = new RoleInfo( roleName, roleType );
           m_roleManager.addRole( origRole );
   
           // Lookup the role
           RoleInfo role = m_roleManager.getRole( roleName );
           assertTrue( origRole.equals( role ) );
   
  -        // Lookup the role by shorthand
  -        role = m_roleManager.getRoleByShorthandName( shorthand );
  -        assertTrue( origRole.equals( role ) );
  -
           // Lookup the role by type
  -        role = m_roleManager.getRoleByType( Task.class );
  +        role = m_roleManager.getRoleByImplementationClass( roleType );
           assertTrue( origRole.equals( role ) );
   
           // Lookup an unknown role
           RoleInfo unknownRole = m_roleManager.getRole( "unknown" );
           assertNull( unknownRole );
   
  -        // Lookup an unknown shorthand
  -        unknownRole = m_roleManager.getRoleByShorthandName( "unknown" );
  -        assertNull( unknownRole );
  -
           // Lookup an unknown role
  -        unknownRole = m_roleManager.getRoleByType( DefaultRoleManagerTestCase.class );
  +        unknownRole = m_roleManager.getRoleByImplementationClass( DefaultRoleManagerTestCase.class );
           assertNull( unknownRole );
       }
   
  @@ -80,8 +72,8 @@
       public void testParent() throws Exception
       {
           final String roleName = "role-name";
  -        final String shorthand = "shorthand";
  -        final RoleInfo origRole = new RoleInfo( roleName, shorthand, Task.class );
  +        final Class roleType = Task.class;
  +        final RoleInfo origRole = new RoleInfo( roleName, roleType );
           m_roleManager.addRole( origRole );
           final RoleManager roleManager = new DefaultRoleManager( m_roleManager );
   
  @@ -89,12 +81,8 @@
           RoleInfo roleInfo = roleManager.getRole( roleName );
           assertTrue( origRole.equals( roleInfo ) );
   
  -        // Lookup by shorthand
  -        roleInfo = roleManager.getRoleByShorthandName( shorthand );
  -        assertTrue( origRole.equals( roleInfo ) );
  -
           // Lookup by type
  -        roleInfo = roleManager.getRoleByType( Task.class );
  +        roleInfo = roleManager.getRoleByImplementationClass( roleType );
           assertTrue( origRole.equals( roleInfo ) );
       }
   
  @@ -104,31 +92,25 @@
       public void testOverrideName() throws Exception
       {
           final String roleName = "role-name";
  -        final String shorthand = "shorthand";
  +        final Class roleType = Task.class;
   
           // Add original role
  -        final RoleInfo origRole = new RoleInfo( roleName, shorthand, Task.class );
  +        final RoleInfo origRole = new RoleInfo( roleName, roleType );
           m_roleManager.addRole( origRole );
   
           // Override role
           final RoleManager roleManager = new DefaultRoleManager( m_roleManager );
  -        final RoleInfo overrideNameRole = new RoleInfo( roleName, "shorthand1" );
  +        final RoleInfo overrideNameRole = new RoleInfo( roleName );
           roleManager.addRole( overrideNameRole );
  -        final RoleInfo overrideShorthandRole = new RoleInfo( "role2", shorthand );
  -        roleManager.addRole( overrideShorthandRole );
  -        final RoleInfo overrideTypeRole = new RoleInfo( "role3", "shorthand3", Task.class );
  +        final RoleInfo overrideTypeRole = new RoleInfo( "another-role", roleType );
           roleManager.addRole( overrideTypeRole );
   
           // Lookup role by name
           RoleInfo roleInfo = roleManager.getRole( roleName );
           assertTrue( overrideNameRole.equals( roleInfo ) );
   
  -        // Lookup role by shorthand
  -        roleInfo = roleManager.getRoleByShorthandName( shorthand );
  -        assertTrue( overrideShorthandRole.equals( roleInfo ) );
  -
           // Lookup role by type
  -        roleInfo = roleManager.getRoleByType( Task.class );
  +        roleInfo = roleManager.getRoleByImplementationClass( roleType );
           assertTrue( overrideTypeRole.equals( roleInfo ) );
       }
   
  @@ -138,8 +120,8 @@
       public void testDuplicate() throws Exception
       {
           final String roleName = "role-name";
  -        final String shorthand = "shorthand";
  -        final RoleInfo origRole = new RoleInfo( roleName, shorthand, Task.class );
  +        final Class roleType = Task.class;
  +        final RoleInfo origRole = new RoleInfo( roleName, roleType );
           m_roleManager.addRole( origRole );
   
           // Duplicate role name
  @@ -154,27 +136,15 @@
               assertSameMessage( message, exc );
           }
   
  -        // Duplicate shorthand
  -        try
  -        {
  -            m_roleManager.addRole( new RoleInfo( "another-role", shorthand ) );
  -            fail();
  -        }
  -        catch( RoleException exc )
  -        {
  -            final String message = REZ.getString( "duplicate-shorthand.error", shorthand );
  -            assertSameMessage( message, exc );
  -        }
  -
  -        // Duplicate type
  +        // Duplicate implementation class
           try
           {
  -            m_roleManager.addRole( new RoleInfo( null, Task.class ) );
  +            m_roleManager.addRole( new RoleInfo( null, roleType ) );
               fail();
           }
           catch( RoleException exc )
           {
  -            final String message = REZ.getString( "duplicate-type.error", Task.class.getName() );
  +            final String message = REZ.getString( "duplicate-type.error", roleType.getName() );
               assertSameMessage( message, exc );
           }
       }
  
  
  
  1.3       +2 -2      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/service/test/InstantiatingServiceManagerTestCase.java
  
  Index: InstantiatingServiceManagerTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/service/test/InstantiatingServiceManagerTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InstantiatingServiceManagerTestCase.java	9 Apr 2002 07:21:13 -0000	1.2
  +++ InstantiatingServiceManagerTestCase.java	24 Apr 2002 02:21:01 -0000	1.3
  @@ -23,7 +23,7 @@
    * Test cases for the default service manager.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/09 07:21:13 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/24 02:21:01 $
    */
   public class InstantiatingServiceManagerTestCase
       extends AbstractComponentTest
  @@ -143,7 +143,7 @@
       {
           // TODO - add stuff to TypeDeployer to do this instead
           final RoleManager roleManager = (RoleManager)getServiceManager().lookup( RoleManager.ROLE );
  -        roleManager.addRole( new RoleInfo( serviceRoleName, null, serviceType ) );
  +        roleManager.addRole( new RoleInfo( serviceRoleName, serviceType ) );
           final DefaultTypeFactory typeFactory = new DefaultTypeFactory( getClass().getClassLoader() );
           typeFactory.addNameClassMapping( serviceRoleName, factoryClass.getName() );
           final TypeManager typeManager = (TypeManager)getServiceManager().lookup( TypeManager.ROLE );
  
  
  
  1.3       +2 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java
  
  Index: AbstractContainerTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractContainerTask.java	21 Apr 2002 01:58:52 -0000	1.2
  +++ AbstractContainerTask.java	24 Apr 2002 02:21:01 -0000	1.3
  @@ -29,7 +29,7 @@
    * This is the class that Task writers should extend to provide custom tasks.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/21 01:58:52 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/24 02:21:01 $
    */
   public abstract class AbstractContainerTask
       extends AbstractTask
  @@ -216,7 +216,7 @@
           throws TaskException
       {
           final RoleManager roleManager = (RoleManager)getService( RoleManager.class );
  -        final RoleInfo role = roleManager.getRoleByType( roleType );
  +        final RoleInfo role = roleManager.getRoleByImplementationClass( roleType );
           if( role == null )
           {
               final String message = REZ.getString( "container.unknown-role-type.error", roleType.getName() );
  
  
  
  1.2       +2 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/DataType.java
  
  Index: DataType.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/DataType.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DataType.java	14 Apr 2002 09:30:13 -0000	1.1
  +++ DataType.java	24 Apr 2002 02:21:01 -0000	1.2
  @@ -12,9 +12,9 @@
    * as stand alone data types.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @ant:role shorthand="data-type"
  + * @ant.role name="data-type"
    */
   public interface DataType
   {
  -    String ROLE = DataType.class.getName();
  +    String ROLE = "data-type";
   }
  
  
  
  1.2       +1 -1      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/FileNameMapper.java
  
  Index: FileNameMapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/FileNameMapper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileNameMapper.java	14 Apr 2002 09:30:13 -0000	1.1
  +++ FileNameMapper.java	24 Apr 2002 02:21:01 -0000	1.2
  @@ -22,7 +22,7 @@
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    *
  - * @ant:role shorthand="mapper"
  + * @ant.role name="mapper"
    */
   public interface FileNameMapper
   {
  
  
  
  1.2       +2 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/conditions/Condition.java
  
  Index: Condition.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/conditions/Condition.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Condition.java	14 Apr 2002 09:30:14 -0000	1.1
  +++ Condition.java	24 Apr 2002 02:21:01 -0000	1.2
  @@ -15,9 +15,9 @@
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:30:14 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/24 02:21:01 $
    *
  - * @ant:role shorthand="condition"
  + * @ant.role name="condition"
    */
   public interface Condition
   {
  
  
  
  1.2       +2 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/file/FileList.java
  
  Index: FileList.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/file/FileList.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileList.java	14 Apr 2002 09:30:14 -0000	1.1
  +++ FileList.java	24 Apr 2002 02:21:01 -0000	1.2
  @@ -14,9 +14,9 @@
    * A list of files.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:30:14 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/24 02:21:01 $
    *
  - * @ant:role shorthand="path"
  + * @ant.role name="path"
    */
   public interface FileList
   {
  
  
  
  1.2       +2 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/filters/LineFilter.java
  
  Index: LineFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/filters/LineFilter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LineFilter.java	14 Apr 2002 09:30:14 -0000	1.1
  +++ LineFilter.java	24 Apr 2002 02:21:01 -0000	1.2
  @@ -14,9 +14,9 @@
    * Filters lines of text.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:30:14 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/24 02:21:01 $
    *
  - * @ant:role shorthand="line-filter"
  + * @ant.role name="line-filter"
    */
   public interface LineFilter
   {
  
  
  
  1.2       +2 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/filters/TokenSet.java
  
  Index: TokenSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/filters/TokenSet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TokenSet.java	14 Apr 2002 09:30:14 -0000	1.1
  +++ TokenSet.java	24 Apr 2002 02:21:01 -0000	1.2
  @@ -14,9 +14,9 @@
    * A set of tokens.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:30:14 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/24 02:21:01 $
    *
  - * @ant:role shorthand="token-set"
  + * @ant.role name="token-set"
    */
   public interface TokenSet
   {
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message