ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/api/src/java/org/apache/myrmidon/aspects AbstractAspectHandler.java AspectHandler.java NoopAspectHandler.java
Date Thu, 25 Apr 2002 11:33:35 GMT
donaldp     02/04/25 04:33:35

  Modified:    myrmidon/src/samples sample.ant
               container/src/java/org/apache/myrmidon/components/embeddor
                        DefaultEmbeddor.java
               container/src/java/org/apache/myrmidon/components/executor
                        DefaultExecutor.java PrintingExecutor.java
  Removed:     antlib/src/java/org/apache/antlib/runtime Facility.java
               container/src/java/org/apache/myrmidon/components/aspect
                        DefaultAspectManager.java Resources.properties
               container/src/java/org/apache/myrmidon/components/executor
                        AspectAwareExecutor.java
               container/src/java/org/apache/myrmidon/interfaces/aspect
                        AspectManager.java
               api/src/java/org/apache/myrmidon/aspects
                        AbstractAspectHandler.java AspectHandler.java
                        NoopAspectHandler.java
  Log:
  Remove all notion of aspects/Facilities.
  
  Revision  Changes    Path
  1.3       +1 -16     jakarta-ant-myrmidon/myrmidon/src/samples/sample.ant
  
  Index: sample.ant
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/myrmidon/src/samples/sample.ant,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sample.ant	22 Apr 2002 06:52:32 -0000	1.2
  +++ sample.ant	25 Apr 2002 11:33:34 -0000	1.3
  @@ -105,22 +105,7 @@
       </target>
   
       <target name="namespace-test">
  -
  -        <!-- ant and doc are built in namespaces -->
  -        <log ant:fail-on-error="true" message="Some random message">
  -            <doc:description>
  -              Test case for aspects
  -            </doc:description>
  -            <ant:some-element some-attribute="blah"/>
  -        </log>
  -
  -        <!-- load facility for blee: namespace -->
  -        <facility namespace="blee">
  -            <noop/>
  -        </facility>
  -
  -        <log blee:some-param="blah" message="Blee namespace test successful!"/>
  -
  +        <log message="Namespaces/Aspects no longer supported"/>
       </target>
   
       <target name="fail-test1">
  
  
  
  1.52      +2 -6      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java
  
  Index: DefaultEmbeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- DefaultEmbeddor.java	25 Apr 2002 08:13:43 -0000	1.51
  +++ DefaultEmbeddor.java	25 Apr 2002 11:33:34 -0000	1.52
  @@ -36,7 +36,6 @@
   import org.apache.myrmidon.components.event.DefaultTaskEventManager;
   import org.apache.myrmidon.components.store.DefaultPropertyStore;
   import org.apache.myrmidon.components.workspace.DefaultExecutionFrame;
  -import org.apache.myrmidon.interfaces.aspect.AspectManager;
   import org.apache.myrmidon.interfaces.builder.ProjectBuilder;
   import org.apache.myrmidon.interfaces.classloader.ClassLoaderManager;
   import org.apache.myrmidon.interfaces.configurer.Configurer;
  @@ -66,7 +65,7 @@
    * Instantiate this to embed inside other applications.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.51 $ $Date: 2002/04/25 08:13:43 $
  + * @version $Revision: 1.52 $ $Date: 2002/04/25 11:33:34 $
    */
   public class DefaultEmbeddor
       extends AbstractLogEnabled
  @@ -274,9 +273,6 @@
                                RoleManager.class,
                                PREFIX + "role.DefaultRoleManager" );
           m_serviceManager.put( RoleRegistry.ROLE, roleManager );
  -        createComponent( AspectManager.ROLE,
  -                         AspectManager.class,
  -                         PREFIX + "aspect.DefaultAspectManager" );
           createComponent( Deployer.ROLE,
                            Deployer.class,
                            PREFIX + "deployer.DefaultDeployer" );
  @@ -285,7 +281,7 @@
                            PREFIX + "classloader.DefaultClassLoaderManager" );
           createComponent( Executor.ROLE,
                            Executor.class,
  -                         PREFIX + "executor.AspectAwareExecutor" );
  +                         PREFIX + "executor.DefaultExecutor" );
           createComponent( PropertyResolver.ROLE,
                            PropertyResolver.class,
                            PREFIX + "property.DefaultPropertyResolver" );
  
  
  
  1.39      +39 -16    jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java
  
  Index: DefaultExecutor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- DefaultExecutor.java	25 Apr 2002 09:53:32 -0000	1.38
  +++ DefaultExecutor.java	25 Apr 2002 11:33:35 -0000	1.39
  @@ -26,7 +26,7 @@
    * The basic executor that just executes the tasks.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.38 $ $Date: 2002/04/25 09:53:32 $
  + * @version $Revision: 1.39 $ $Date: 2002/04/25 11:33:35 $
    */
   public class DefaultExecutor
       extends AbstractLogEnabled
  @@ -80,7 +80,7 @@
               doConfigure( task, taskModel, context, frame );
   
               debug( "executing.notice", taskName );
  -            task.execute();
  +            doTaskExecute( taskModel, task );
           }
           catch( Exception e )
           {
  @@ -91,7 +91,14 @@
           }
       }
   
  -    protected final void debug( final String key, final String taskName )
  +    /**
  +     * Helper method for debuging stage in lifecycle of task.
  +     *
  +     * @param key the key for i18n message for stage
  +     * @param taskName the name of task
  +     */
  +    protected final void debug( final String key,
  +                                final String taskName )
       {
           if( getLogger().isDebugEnabled() )
           {
  @@ -131,19 +138,6 @@
       }
   
       /**
  -     * Configures a task instance.
  -     */
  -    protected final void doConfigure( final Task task,
  -                                      final ModelElement taskModel,
  -                                      final TaskContext taskContext,
  -                                      final ExecutionFrame frame )
  -        throws Exception
  -    {
  -        final Configurer configurer = (Configurer)frame.getServiceManager().lookup( Configurer.ROLE
);
  -        configurer.configureElement( task, taskModel, taskContext );
  -    }
  -
  -    /**
        * Sets the context for a task.
        */
       protected final void doContextualize( final Task task,
  @@ -162,5 +156,34 @@
                   REZ.getString( "contextualize.error", taskModel.getName() );
               throw new TaskException( message, throwable );
           }
  +    }
  +
  +
  +    /**
  +     * Configures a task instance.
  +     */
  +    protected final void doConfigure( final Task task,
  +                                      final ModelElement taskModel,
  +                                      final TaskContext taskContext,
  +                                      final ExecutionFrame frame )
  +        throws Exception
  +    {
  +        final Configurer configurer = (Configurer)frame.getServiceManager().lookup( Configurer.ROLE
);
  +        configurer.configureElement( task, taskModel, taskContext );
  +    }
  +
  +    /**
  +     * Actually execute task.
  +     *
  +     * @param taskModel the TaskModel representing task
  +     * @param task the task
  +     * @throws TaskException if tasks execute() method
  +     *         throws a TaskException
  +     */
  +    protected void doTaskExecute( final ModelElement taskModel,
  +                                  final Task task )
  +        throws TaskException
  +    {
  +        task.execute();
       }
   }
  
  
  
  1.7       +2 -2      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/executor/PrintingExecutor.java
  
  Index: PrintingExecutor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/executor/PrintingExecutor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PrintingExecutor.java	23 Apr 2002 07:11:57 -0000	1.6
  +++ PrintingExecutor.java	25 Apr 2002 11:33:35 -0000	1.7
  @@ -15,10 +15,10 @@
    * An executor that just displays the tasks rather than executing them.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.6 $ $Date: 2002/04/23 07:11:57 $
  + * @version $Revision: 1.7 $ $Date: 2002/04/25 11:33:35 $
    */
   public class PrintingExecutor
  -    extends AspectAwareExecutor
  +    extends DefaultExecutor
   {
       protected void doTaskExecute( final ModelElement taskModel, final Task task )
           throws TaskException
  
  
  

--
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