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/myrmidon/src/samples sample.ant
Date Sat, 11 May 2002 12:44:01 GMT
adammurdoch    02/05/11 05:44:01

  Modified:    ant1compat project.xml
               ant1compat/src/test/org/apache/tools/ant/test
                        Ant1CompatTestCase.java
               antlib/src/java/org/apache/antlib/project TargetTask.java
               antlib/src/java/org/apache/antlib/sound SoundTask.java
               antlib/src/test/org/apache/antlib/core/test IfTestCase.java
                        PropertyTestCase.java
               antlib/src/test/org/apache/antlib/vfile/test
                        CopyFilesTaskTestCase.java
               aut/src/test/org/apache/aut AbstractAutTestCase.java
               container/src/java/org/apache/myrmidon/components/executor
                        DefaultExecutor.java
               container/src/java/org/apache/myrmidon/components/workspace
                        DefaultWorkspace.java
               container/src/java/org/apache/myrmidon/interfaces
                        EmbeddedAnt.java
               container/src/java/org/apache/myrmidon/interfaces/executor
                        DefaultExecutionFrame.java ExecutionFrame.java
               container/src/java/org/apache/myrmidon/interfaces/workspace
                        Workspace.java
               container/src/test/org/apache/myrmidon
                        LogMessageTracker.java
               container/src/test/org/apache/myrmidon/components
                        AbstractComponentTest.java
               container/src/test/org/apache/myrmidon/components/embeddor/test
                        DefaultEmbeddorTest.java
               framework/src/java/org/apache/myrmidon/framework
                        AbstractContainerTask.java
               framework/src/test/org/apache/myrmidon/framework/conditions/test
                        AndConditionTestCase.java
                        IsSetConditionTestCase.java
                        IsTrueConditionTestCase.java
                        NotConditionTestCase.java OrConditionTestCase.java
               framework/src/test/org/apache/myrmidon/framework/file/test
                        PathTestCase.java
               myrmidon/src/samples sample.ant
  Added:       antlib/src/test/org/apache/antlib
                        AbstractProjectTestCase.java
               container/src/test/org/apache/myrmidon
                        TrackingTaskListener.java
               framework/src/test/org/apache/myrmidon
                        AbstractTaskTestCase.java
  Removed:     container/src/test/org/apache/myrmidon
                        TrackingProjectListener.java
               framework/src/test/org/apache/myrmidon
                        AbstractProjectTest.java
  Log:
  Fix the tests fun (they're still broken):
  
  * Added a ServiceManager parameter to ExecutionFrame.createChildFrame(), to
    allow services to be provided for the child frame.  Use this in DefaultWorkspace,
    rather than the casting hack that was there.
  
  * Made sure that everywhere that calls Executor.execute() creates a child
    ExecutionFrame with the correct name.  This means that TargetTask does not
    need to create its own child ExecutionFrame any more.
  
  * Changed Workspace.addProjectListener() and removeProjectListener() to
    take a TaskListener parameter instead of a ProjectListener.  Renamed the
    methods too.
  
  * Added EmbeddedAnt.addTaskListener().
  
  * Moved AbstractProjectTest from framework to antlib, since it's never going to
    work without the project antlib.
  
  * Changed the tests to use TaskListener rather than ProjectListener.
  
  * Changed LogMessageTracker to use the task path, rather than target name, to
    validate log message.
  
  Revision  Changes    Path
  1.8       +2 -1      jakarta-ant-myrmidon/ant1compat/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/ant1compat/project.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- project.xml	10 May 2002 06:27:31 -0000	1.7
  +++ project.xml	11 May 2002 12:43:59 -0000	1.8
  @@ -53,9 +53,10 @@
   
           <classpath>
               <fileset dir="../container/build/lib" includes="*.jar"/>
  +            <fileset dir="../antlib/build/lib" includes="*.jar"/>
               <path location="../aut/build/test/classes"/>
               <path location="../container/build/test/classes"/>
  -            <path location="../framework/build/test/classes"/>
  +            <path location="../antlib/build/test/classes"/>
           </classpath>
       </unitTest>
   
  
  
  
  1.2       +3 -3      jakarta-ant-myrmidon/ant1compat/src/test/org/apache/tools/ant/test/Ant1CompatTestCase.java
  
  Index: Ant1CompatTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/ant1compat/src/test/org/apache/tools/ant/test/Ant1CompatTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Ant1CompatTestCase.java	14 Apr 2002 12:38:41 -0000	1.1
  +++ Ant1CompatTestCase.java	11 May 2002 12:44:00 -0000	1.2
  @@ -8,17 +8,17 @@
   package org.apache.tools.ant.test;
   
   import java.io.File;
  -import org.apache.myrmidon.AbstractProjectTest;
  +import org.apache.antlib.AbstractProjectTestCase;
   import org.apache.myrmidon.LogMessageTracker;
   
   /**
    * Simple tests for the Ant1 Compatibility layer.
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 12:38:41 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/11 12:44:00 $
    */
   public class Ant1CompatTestCase
  -    extends AbstractProjectTest
  +    extends AbstractProjectTestCase
   {
       public Ant1CompatTestCase( final String name )
       {
  
  
  
  1.5       +1 -29     jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/project/TargetTask.java
  
  Index: TargetTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/project/TargetTask.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TargetTask.java	5 May 2002 13:49:33 -0000	1.4
  +++ TargetTask.java	11 May 2002 12:44:00 -0000	1.5
  @@ -14,14 +14,13 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.api.metadata.ModelElement;
   import org.apache.myrmidon.framework.AbstractContainerTask;
  -import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
   import org.apache.myrmidon.interfaces.property.NameValidator;
   
   /**
    * A simple task to task to execute a group of tasks.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.4 $ $Date: 2002/05/05 13:49:33 $
  + * @version $Revision: 1.5 $ $Date: 2002/05/11 12:44:00 $
    * @ant.task name="target"
    */
   public class TargetTask
  @@ -42,11 +41,6 @@
       private String m_name;
   
       /**
  -     * The frame in which the tasks in target execute.
  -     */
  -    private ExecutionFrame m_frame;
  -
  -    /**
        * The list of dependencies to execute before this target.
        */
       private Dependency[] m_dependencies;
  @@ -99,8 +93,6 @@
               getContext().verbose( message );
           }
   
  -        setupFrame();
  -
           executeContainedTasks();
       }
   
  @@ -136,16 +128,6 @@
       }
   
       /**
  -     * Setuip the execution frame in preparation for running
  -     * containe dtasks.
  -     */
  -    private void setupFrame()
  -    {
  -        final ExecutionFrame parentFrame = super.getExecutionFrame();
  -        m_frame = parentFrame.createChildFrame( m_name, null, false );
  -    }
  -
  -    /**
        * Execute depencies of target (if any).
        *
        * @throws TaskException if theres an eror executing dependencies.
  @@ -199,16 +181,6 @@
               }
               executeTask( task );
           }
  -    }
  -
  -    /**
  -     * Return a different frame for target.
  -     *
  -     * @return the targets frame
  -     */
  -    protected ExecutionFrame getExecutionFrame()
  -    {
  -        return m_frame;
       }
   
       public String toString()
  
  
  
  1.2       +3 -2      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/sound/SoundTask.java
  
  Index: SoundTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/sound/SoundTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SoundTask.java	14 Apr 2002 10:56:38 -0000	1.1
  +++ SoundTask.java	11 May 2002 12:44:00 -0000	1.2
  @@ -15,6 +15,7 @@
   import org.apache.myrmidon.api.AbstractTask;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
  +import org.apache.myrmidon.listeners.TaskToProjectListenerAdapter;
   
   /**
    * This is an example of an AntTask that makes of use of the AntSoundPlayer.
  @@ -29,7 +30,7 @@
    * @ant.task name="sound-listener"
    * @author Nick Pellow
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $, $Date: 2002/04/14 10:56:38 $
  + * @version $Revision: 1.2 $, $Date: 2002/05/11 12:44:00 $
    */
   public class SoundTask
       extends AbstractTask
  @@ -81,7 +82,7 @@
           }
   
           final Workspace workspace = (Workspace)getContext().getService( Workspace.class );
  -        workspace.addProjectListener( soundPlayer );
  +        workspace.addTaskListener( new TaskToProjectListenerAdapter( soundPlayer ) );
       }
   
       /**
  
  
  
  1.1                  jakarta-ant-myrmidon/antlib/src/test/org/apache/antlib/AbstractProjectTestCase.java
  
  Index: AbstractProjectTestCase.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included  with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.antlib;
  
  import java.io.File;
  import org.apache.aut.AbstractAutTestCase;
  import org.apache.myrmidon.TrackingTaskListener;
  import org.apache.myrmidon.api.event.TaskListener;
  import org.apache.myrmidon.interfaces.EmbeddedAnt;
  
  /**
   * A base class for test cases which need to execute projects or tasks.
   *
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.1 $ $Date: 2002/05/11 12:44:00 $
   */
  public class AbstractProjectTestCase
      extends AbstractAutTestCase
  {
      public AbstractProjectTestCase( final String name )
      {
          super( name );
      }
  
      /**
       * Executes a target in a project, and asserts that it fails with the
       * given error message.
       */
      protected void executeTargetExpectError( final File projectFile,
                                               final String targetName,
                                               final String message )
      {
          executeTargetExpectError( projectFile, targetName, new String[]{message} );
      }
  
      /**
       * Executes a target in a project, and asserts that it fails with the
       * given error messages.
       */
      protected void executeTargetExpectError( final File projectFile,
                                               final String targetName,
                                               final String[] messages )
      {
          try
          {
              executeTarget( projectFile, targetName, null );
              fail( "target execution did not fail" );
          }
          catch( Exception e )
          {
              assertSameMessage( messages, e );
          }
      }
  
      /**
       * Executes a target in a project, and asserts that it does not fail.
       */
      protected void executeTarget( final File projectFile, final String targetName )
          throws Exception
      {
          executeTarget( projectFile, targetName, null );
      }
  
      /**
       * Executes a target in a project, and asserts that it does not fail.
       */
      protected void executeTarget( final File projectFile,
                                    final String targetName,
                                    final TaskListener listener )
          throws Exception
      {
          final EmbeddedAnt embeddor = new EmbeddedAnt();
          final TrackingTaskListener tracker = new TrackingTaskListener();
  
          try
          {
              // Setup a dummy install
              final File distDir = getTestDirectory( "dist" );
              getTestDirectory( "dist/lib/core" );
              getTestDirectory( "dist/ext" );
  
              // Configure embeddor
              embeddor.setHomeDirectory( distDir );
              embeddor.enableLogging( getLogger() );
              embeddor.setSharedClassLoader( getClass().getClassLoader() );
              embeddor.setContainerClassLoader( getClass().getClassLoader() );
              embeddor.setProjectFile( projectFile.getAbsolutePath() );
              embeddor.setProjectListener( null );
  
              // Add a listener to make sure all is good
              embeddor.addTaskListener( tracker );
  
              // Add supplied listener
              if( listener != null )
              {
                  embeddor.addTaskListener( listener );
              }
  
              // Now execute the target
              embeddor.executeTargets( new String[]{targetName} );
          }
          finally
          {
              embeddor.stop();
          }
  
  
          // Make sure all expected events were delivered
          tracker.assertComplete();
          if( listener instanceof TrackingTaskListener )
          {
              ( (TrackingTaskListener)listener ).assertComplete();
          }
      }
  }
  
  
  
  1.3       +14 -14    jakarta-ant-myrmidon/antlib/src/test/org/apache/antlib/core/test/IfTestCase.java
  
  Index: IfTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/test/org/apache/antlib/core/test/IfTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IfTestCase.java	6 May 2002 09:29:43 -0000	1.2
  +++ IfTestCase.java	11 May 2002 12:44:00 -0000	1.3
  @@ -8,18 +8,18 @@
   package org.apache.antlib.core.test;
   
   import java.io.File;
  +import org.apache.antlib.AbstractProjectTestCase;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.myrmidon.AbstractProjectTest;
   import org.apache.myrmidon.LogMessageTracker;
   
   /**
    * Test cases for the <if> task.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.2 $ $Date: 2002/05/06 09:29:43 $
  + * @version $Revision: 1.3 $ $Date: 2002/05/11 12:44:00 $
    */
   public class IfTestCase
  -    extends AbstractProjectTest
  +    extends AbstractProjectTestCase
   {
       private static final Resources REZ = getResourcesForTested( IfTestCase.class );
   
  @@ -38,7 +38,7 @@
   
           // Test when property is set to 'true'
           LogMessageTracker listener = new LogMessageTracker();
  -        listener.addExpectedMessage( "true-prop", "test-prop is set" );
  +        listener.addExpectedMessage( "/if/true-prop/if/log", "test-prop is set" );
           executeTarget( projectFile, "true-prop", listener );
   
           // Test when property is set to a value other than 'true' or 'false'
  @@ -46,12 +46,12 @@
   
           // Test when property is set to 'false'
           listener = new LogMessageTracker();
  -        listener.addExpectedMessage( "false-prop", "test-prop is not set" );
  +        listener.addExpectedMessage( "/if/false-prop/if/log", "test-prop is not set" );
           executeTarget( projectFile, "false-prop", listener );
   
           // Test when property is not set
           listener = new LogMessageTracker();
  -        listener.addExpectedMessage( "not-set-prop", "test-prop is not set" );
  +        listener.addExpectedMessage( "/if/not-set-prop/if/log", "test-prop is not set" );
           executeTarget( projectFile, "not-set-prop", listener );
       }
   
  @@ -65,10 +65,10 @@
   
           // Test when property is set to 'true'
           LogMessageTracker listener = new LogMessageTracker();
  -        listener.addExpectedMessage( "nested-conditions", "prop-true is set" );
  -        listener.addExpectedMessage( "nested-conditions", "prop-false is set" );
  -        listener.addExpectedMessage( "nested-conditions", "prop-true is true" );
  -        listener.addExpectedMessage( "nested-conditions",
  +        listener.addExpectedMessage( "/if/nested-conditions/if/log", "prop-true is set" );
  +        listener.addExpectedMessage( "/if/nested-conditions/if/log", "prop-false is set" );
  +        listener.addExpectedMessage( "/if/nested-conditions/if/log", "prop-true is true" );
  +        listener.addExpectedMessage( "/if/nested-conditions/if/log",
                                        "prop-true is true and prop-false is not true" );
           executeTarget( projectFile, "nested-conditions", listener );
       }
  @@ -82,10 +82,10 @@
   
           // Test when property is not set
           LogMessageTracker listener = new LogMessageTracker();
  -        listener.addExpectedMessage( "multiple-nested-tasks", "task 1" );
  -        listener.addExpectedMessage( "multiple-nested-tasks", "task 2" );
  -        listener.addExpectedMessage( "multiple-nested-tasks", "task 3" );
  -        listener.addExpectedMessage( "multiple-nested-tasks", "task 4" );
  +        listener.addExpectedMessage( "/if/multiple-nested-tasks/if/log", "task 1" );
  +        listener.addExpectedMessage( "/if/multiple-nested-tasks/if/log", "task 2" );
  +        listener.addExpectedMessage( "/if/multiple-nested-tasks/if/log", "task 3" );
  +        listener.addExpectedMessage( "/if/multiple-nested-tasks/if/log", "task 4" );
           executeTarget( projectFile, "multiple-nested-tasks", listener );
       }
   
  
  
  
  1.3       +6 -7      jakarta-ant-myrmidon/antlib/src/test/org/apache/antlib/core/test/PropertyTestCase.java
  
  Index: PropertyTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/test/org/apache/antlib/core/test/PropertyTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PropertyTestCase.java	6 May 2002 09:29:43 -0000	1.2
  +++ PropertyTestCase.java	11 May 2002 12:44:00 -0000	1.3
  @@ -8,9 +8,8 @@
   package org.apache.antlib.core.test;
   
   import java.io.File;
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  +import org.apache.antlib.AbstractProjectTestCase;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.myrmidon.AbstractProjectTest;
   import org.apache.myrmidon.LogMessageTracker;
   //import org.apache.myrmidon.components.workspace.DefaultTaskContext;
   //import org.apache.myrmidon.components.store.DefaultPropertyStore;
  @@ -19,10 +18,10 @@
    * Test cases for <property> task.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.2 $ $Date: 2002/05/06 09:29:43 $
  + * @version $Revision: 1.3 $ $Date: 2002/05/11 12:44:00 $
    */
   public class PropertyTestCase
  -    extends AbstractProjectTest
  +    extends AbstractProjectTestCase
   {
       private static final Resources REZ = getResourcesForTested( PropertyTestCase.class );
   
  @@ -42,17 +41,17 @@
   
           // Set by attribute
           LogMessageTracker tracker = new LogMessageTracker();
  -        tracker.addExpectedMessage( "set-attr", "test-prop = [some value]" );
  +        tracker.addExpectedMessage( "/property/set-attr/log", "test-prop = [some value]" );
           executeTarget( projectFile, "set-attr", tracker );
   
           // Set by text content
           tracker = new LogMessageTracker();
  -        tracker.addExpectedMessage( "set-content", "test-prop2 = [some value]" );
  +        tracker.addExpectedMessage( "/property/set-content/log", "test-prop2 = [some value]" );
           executeTarget( projectFile, "set-content", tracker );
   
           // Set by nested element
           tracker = new LogMessageTracker();
  -        tracker.addExpectedMessage( "set-element", "test-prop3 = [value=[some value]]" );
  +        tracker.addExpectedMessage( "/property/set-element/log", "test-prop3 = [value=[some value]]" );
           executeTarget( projectFile, "set-element", tracker );
       }
   
  
  
  
  1.2       +3 -3      jakarta-ant-myrmidon/antlib/src/test/org/apache/antlib/vfile/test/CopyFilesTaskTestCase.java
  
  Index: CopyFilesTaskTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/test/org/apache/antlib/vfile/test/CopyFilesTaskTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CopyFilesTaskTestCase.java	14 Apr 2002 10:48:03 -0000	1.1
  +++ CopyFilesTaskTestCase.java	11 May 2002 12:44:00 -0000	1.2
  @@ -8,16 +8,16 @@
   package org.apache.antlib.vfile.test;
   
   import java.io.File;
  -import org.apache.myrmidon.AbstractProjectTest;
  +import org.apache.antlib.AbstractProjectTestCase;
   
   /**
    * Test cases for the <v-copy> task.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 10:48:03 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/11 12:44:00 $
    */
   public class CopyFilesTaskTestCase
  -    extends AbstractProjectTest
  +    extends AbstractProjectTestCase
   {
       public CopyFilesTaskTestCase( String name )
       {
  
  
  
  1.2       +2 -2      jakarta-ant-myrmidon/aut/src/test/org/apache/aut/AbstractAutTestCase.java
  
  Index: AbstractAutTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/test/org/apache/aut/AbstractAutTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractAutTestCase.java	18 Apr 2002 12:53:14 -0000	1.1
  +++ AbstractAutTestCase.java	11 May 2002 12:44:00 -0000	1.2
  @@ -21,7 +21,7 @@
    * test resources.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/18 12:53:14 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/11 12:44:00 $
    */
   public abstract class AbstractAutTestCase
       extends TestCase
  @@ -153,7 +153,7 @@
       {
           if( m_logger == null )
           {
  -            m_logger = new ConsoleLogger( ConsoleLogger.LEVEL_INFO );
  +            m_logger = new ConsoleLogger( ConsoleLogger.LEVEL_WARN );
           }
           return m_logger;
       }
  
  
  
  1.41      +5 -3      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.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- DefaultExecutor.java	2 May 2002 04:03:52 -0000	1.40
  +++ DefaultExecutor.java	11 May 2002 12:44:00 -0000	1.41
  @@ -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.40 $ $Date: 2002/05/02 04:03:52 $
  + * @version $Revision: 1.41 $ $Date: 2002/05/11 12:44:00 $
    */
   public class DefaultExecutor
       extends AbstractLogEnabled
  @@ -42,9 +42,11 @@
           throws TaskException
       {
           final TaskEventManager eventManager = frame.getTaskEventManager();
  -        eventManager.fireTaskStarting( frame.getName(), taskModel.getName(), taskModel.getLocation() );
  +        final String taskName = taskModel.getName();
  +        final String taskPath = frame.getName();
  +        eventManager.fireTaskStarting( taskPath, taskName, taskModel.getLocation() );
           doExecute( taskModel, frame );
  -        eventManager.fireTaskFinished( frame.getName(), taskModel.getName(), taskModel.getLocation() );
  +        eventManager.fireTaskFinished( taskPath, taskName, taskModel.getLocation() );
       }
   
       /**
  
  
  
  1.58      +15 -23    jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java
  
  Index: DefaultWorkspace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- DefaultWorkspace.java	11 May 2002 08:21:35 -0000	1.57
  +++ DefaultWorkspace.java	11 May 2002 12:44:00 -0000	1.58
  @@ -14,6 +14,7 @@
   import org.apache.avalon.framework.service.DefaultServiceManager;
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.event.TaskListener;
   import org.apache.myrmidon.api.metadata.ModelElement;
   import org.apache.myrmidon.interfaces.deployer.Deployer;
   import org.apache.myrmidon.interfaces.event.TaskEventManager;
  @@ -26,14 +27,12 @@
   import org.apache.myrmidon.interfaces.oldmodel.TypeLib;
   import org.apache.myrmidon.interfaces.type.TypeManager;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
  -import org.apache.myrmidon.listeners.ProjectListener;
  -import org.apache.myrmidon.listeners.TaskToProjectListenerAdapter;
   
   /**
    * This is the default implementation of Workspace.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.57 $ $Date: 2002/05/11 08:21:35 $
  + * @version $Revision: 1.58 $ $Date: 2002/05/11 12:44:00 $
    */
   public class DefaultWorkspace
       extends AbstractLogEnabled
  @@ -60,10 +59,9 @@
        *
        * @param listener the listener
        */
  -    public void addProjectListener( final ProjectListener listener )
  +    public void addTaskListener( final TaskListener listener )
       {
  -        final TaskToProjectListenerAdapter adapter = new TaskToProjectListenerAdapter( listener );
  -        m_eventManager.addTaskListener( adapter );
  +        m_eventManager.addTaskListener( listener );
       }
   
       /**
  @@ -71,10 +69,9 @@
        *
        * @param listener the listener
        */
  -    public void removeProjectListener( final ProjectListener listener )
  +    public void removeTaskListener( final TaskListener listener )
       {
  -        final TaskToProjectListenerAdapter adapter = new TaskToProjectListenerAdapter( listener );
  -        m_eventManager.removeTaskListener( adapter );
  +        m_eventManager.removeTaskListener( listener );
       }
   
       /**
  @@ -113,17 +110,10 @@
       private ExecutionFrame createExecutionFrame( final Project project )
           throws Exception
       {
  -        final ExecutionFrame frame =
  -            m_frame.createChildFrame( project.getProjectName(),
  -                                      project.getBaseDirectory(),
  -                                      true );
  +        // TODO - move all this stuff to ExecutionFrame.createChildFrame( ..., true ).
   
  -        //WARNING: Huge UGly hack on next line
  -        //Need to fix it up so that we are using a mutable
  -        //ServiceManager or maybe more desirably have a separate
  -        //write interface for services/eventManagers
           final DefaultServiceManager serviceManager =
  -            (DefaultServiceManager)frame.getServiceManager();
  +            new DefaultServiceManager( m_frame.getServiceManager() );
   
           //Add in child type manager so each frame can register different
           //sets of tasks etc
  @@ -146,10 +136,11 @@
           serviceManager.put( Workspace.ROLE, this );
           serviceManager.put( Project.ROLE, project );
   
  -        /**
  -         *  @todo Should no occur but done for the time being to simplify evolution.
  -         */
  -        serviceManager.put( ExecutionFrame.ROLE, frame );
  +        final ExecutionFrame frame =
  +            m_frame.createChildFrame( project.getProjectName(),
  +                                      project.getBaseDirectory(),
  +                                      serviceManager,
  +                                      true );
   
           return frame;
       }
  @@ -346,7 +337,8 @@
               targetModel.addChild( tasks[ i ] );
           }
   
  -        m_executor.execute( targetModel, entry.getFrame() );
  +        final ExecutionFrame frame = entry.getFrame().createChildFrame( name, null, null, false );
  +        m_executor.execute( targetModel, frame );
       }
   
       /**
  
  
  
  1.6       +15 -4     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/EmbeddedAnt.java
  
  Index: EmbeddedAnt.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/EmbeddedAnt.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- EmbeddedAnt.java	10 May 2002 06:27:32 -0000	1.5
  +++ EmbeddedAnt.java	11 May 2002 12:44:00 -0000	1.6
  @@ -24,10 +24,12 @@
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.event.TaskListener;
   import org.apache.myrmidon.interfaces.embeddor.Embeddor;
   import org.apache.myrmidon.interfaces.oldmodel.Project;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
   import org.apache.myrmidon.listeners.ProjectListener;
  +import org.apache.myrmidon.listeners.TaskToProjectListenerAdapter;
   
   /**
    * A utility class, that takes care of launching Myrmidon, and building and
  @@ -40,7 +42,7 @@
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.5 $ $Date: 2002/05/10 06:27:32 $
  + * @version $Revision: 1.6 $ $Date: 2002/05/11 12:44:00 $
    */
   public class EmbeddedAnt
       extends AbstractLogEnabled
  @@ -120,6 +122,14 @@
        */
       public void addProjectListener( final ProjectListener listener )
       {
  +        m_listeners.add( new TaskToProjectListenerAdapter( listener ) );
  +    }
  +
  +    /**
  +     * Adds a task listener.
  +     */
  +    public void addTaskListener( final TaskListener listener )
  +    {
           m_listeners.add( listener );
       }
   
  @@ -330,13 +340,13 @@
           if( m_listenerName != null )
           {
               final ProjectListener listener = embeddor.createListener( m_listenerName );
  -            workspace.addProjectListener( listener );
  +            workspace.addTaskListener( new TaskToProjectListenerAdapter( listener ) );
           }
           final int count = m_listeners.size();
           for( int i = 0; i < count; i++ )
           {
  -            final ProjectListener listener = (ProjectListener)m_listeners.get( i );
  -            workspace.addProjectListener( listener );
  +            final TaskListener listener = (TaskListener)m_listeners.get( i );
  +            workspace.addTaskListener( listener );
           }
       }
   
  @@ -450,4 +460,5 @@
               throw new Exception( message );
           }
       }
  +
   }
  
  
  
  1.2       +19 -28    jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor/DefaultExecutionFrame.java
  
  Index: DefaultExecutionFrame.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor/DefaultExecutionFrame.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultExecutionFrame.java	11 May 2002 08:23:31 -0000	1.1
  +++ DefaultExecutionFrame.java	11 May 2002 12:44:00 -0000	1.2
  @@ -7,18 +7,17 @@
    */
   package org.apache.myrmidon.interfaces.executor;
   
  +import java.io.File;
   import org.apache.avalon.framework.logger.Logger;
  -import org.apache.avalon.framework.service.DefaultServiceManager;
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.myrmidon.interfaces.event.TaskEventManager;
   import org.apache.myrmidon.interfaces.property.PropertyStore;
  -import java.io.File;
   
   /**
    * Frames in which tasks are executed.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2002/05/11 08:23:31 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/11 12:44:00 $
    */
   public class DefaultExecutionFrame
       implements ExecutionFrame
  @@ -102,47 +101,39 @@
        * @param name the name of child frame relative to current frame
        * @param partition true if frame is partition frame
        * @return the new child ExecutionFrame
  -     * @see org.apache.myrmidon.interfaces.executor.ExecutionFrame#createChildFrame
        */
       public ExecutionFrame createChildFrame( final String name,
                                               final File baseDirectory,
  +                                            final ServiceManager newServiceManager,
                                               final boolean partition )
       {
  -        final String newName = getName() + "/" + name;
  +        String newName = getName() + "/" + name;
  +
           File dir = baseDirectory;
           if( null == dir )
           {
               dir = getBaseDirectory();
           }
  -        if( !partition )
  +
  +        PropertyStore propertyStore;
  +        if( partition )
           {
  -            return new DefaultExecutionFrame( newName,
  -                                              dir,
  -                                              getLogger(),
  -                                              getPropertyStore(),
  -                                              getServiceManager(),
  -                                              getTaskEventManager() );
  +            propertyStore = getPropertyStore().createChildStore();
           }
           else
           {
  -            return createPartitionedFrame( newName, dir );
  +            propertyStore = getPropertyStore();
           }
  -    }
   
  -    /**
  -     * Create a partitioned pane so that modifications of child
  -     * elements does not effect parent objects.
  -     *
  -     * @param newName the name of new frame
  -     * @return the partiioned frame that is created
  -     */
  -    private ExecutionFrame createPartitionedFrame( final String newName,
  -                                                   final File dir )
  -    {
  -        final PropertyStore propertyStore =
  -            getPropertyStore().createChildStore();
  -        final DefaultServiceManager serviceManager =
  -            new DefaultServiceManager( getServiceManager() );
  +        ServiceManager serviceManager;
  +        if( newServiceManager != null )
  +        {
  +            serviceManager = newServiceManager;
  +        }
  +        else
  +        {
  +            serviceManager = getServiceManager();
  +        }
   
           return new DefaultExecutionFrame( newName,
                                             dir,
  
  
  
  1.15      +13 -11    jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor/ExecutionFrame.java
  
  Index: ExecutionFrame.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor/ExecutionFrame.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ExecutionFrame.java	2 May 2002 04:03:53 -0000	1.14
  +++ ExecutionFrame.java	11 May 2002 12:44:00 -0000	1.15
  @@ -23,7 +23,7 @@
    * a logger.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.14 $ $Date: 2002/05/02 04:03:53 $
  + * @version $Revision: 1.15 $ $Date: 2002/05/11 12:44:00 $
    */
   public interface ExecutionFrame
   {
  @@ -71,24 +71,26 @@
   
       /**
        * Create a child execution frame.
  -     * The name of child frame is the current frames
  -     * name concaternated with "/" and the specified name.
  +     * The name of child frame is this frame's name concaternated
  +     * with "/" and the specified name.
        *
        * <p>If partition is true then this frame is considered a
        * partitioning frame. A partitioning frame is one which
  -     * creates new instances of {@link PropertyStore} and
  -     * {@link ServiceManager}. These new instances will inherit
  -     * values from the parent objects but any modifications
  +     * creates a new instance of {@link PropertyStore}.  This new instances
  +     * will inherit values from the parent object but any modifications
        * (ie additions or removals) will be local to this frame
        * (and child frames).</p>
        *
  -     * @param name the name of child frame relative to current frame
  -     * @param baseDirectory the directory from which frame operates
  -     *        if null will take current frames name
  -     * @param partition true if frame is partition frame
  -     * @return the new child ExecutionFrame
  +     * @param name the name of child frame relative to this frame.
  +     * @param baseDirectory the directory from which the child frame operates.
  +     *        If null will use this frame's base directory.
  +     * @param serviceManager the services to use in the child frame.  If null
  +     *        will use this frame's services.
  +     * @param partition true If frame is partition frame.
  +     * @return the new child ExecutionFrame.
        */
       ExecutionFrame createChildFrame( String name,
                                        File baseDirectory,
  +                                     ServiceManager serviceManager,
                                        boolean partition );
   }
  
  
  
  1.11      +8 -8      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/workspace/Workspace.java
  
  Index: Workspace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/workspace/Workspace.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Workspace.java	28 Apr 2002 05:04:49 -0000	1.10
  +++ Workspace.java	11 May 2002 12:44:00 -0000	1.11
  @@ -8,14 +8,14 @@
   package org.apache.myrmidon.interfaces.workspace;
   
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.event.TaskListener;
   import org.apache.myrmidon.interfaces.oldmodel.Project;
  -import org.apache.myrmidon.listeners.ProjectListener;
   
   /**
  - * This is the abstraction through which Projects are managed and executed.
  + * This is the abstraction through which Projects are executed.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.10 $ $Date: 2002/04/28 05:04:49 $
  + * @version $Revision: 1.11 $ $Date: 2002/05/11 12:44:00 $
    */
   public interface Workspace
   {
  @@ -23,21 +23,21 @@
       String ROLE = Workspace.class.getName();
   
       /**
  -     * Add a listener to project events.
  +     * Adds a listener, which receives all task events fired in this workspace.
        *
        * @param listener the listener
        */
  -    void addProjectListener( ProjectListener listener );
  +    void addTaskListener( TaskListener listener );
   
       /**
  -     * Remove a listener from project events.
  +     * Removes a listener.
        *
        * @param listener the listener
        */
  -    void removeProjectListener( ProjectListener listener );
  +    void removeTaskListener( TaskListener listener );
   
       /**
  -     * Execute a target in a particular project.
  +     * Executes a target in a particular project.
        *
        * @param project the Project
        * @param target the name of the target
  
  
  
  1.3       +18 -14    jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/LogMessageTracker.java
  
  Index: LogMessageTracker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/LogMessageTracker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LogMessageTracker.java	25 Apr 2002 08:17:31 -0000	1.2
  +++ LogMessageTracker.java	11 May 2002 12:44:00 -0000	1.3
  @@ -9,32 +9,36 @@
   
   import java.util.ArrayList;
   import java.util.List;
  -import org.apache.myrmidon.listeners.ProjectEvent;
  +import org.apache.myrmidon.api.event.TaskEvent;
   
   /**
  - * Asserts that log messages are delivered in the correct order.
  + * Asserts that the log messages are delivered, as expected and in the
  + * correct order.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/25 08:17:31 $
  + * @version $Revision: 1.3 $ $Date: 2002/05/11 12:44:00 $
    */
   public class LogMessageTracker
  -    extends TrackingProjectListener
  +    extends TrackingTaskListener
   {
  -    private List m_targets = new ArrayList();
  +    private List m_tasks = new ArrayList();
       private List m_messages = new ArrayList();
   
       /**
  -     * Handles a log message.
  +     * Notify the listener that the task logged
  +     * a message.
  +     *
  +     * @param event the TaskEvent
        */
  -    public void log( final ProjectEvent event )
  +    public void taskMessage( final TaskEvent event )
       {
  -        super.log( event );
  +        super.taskMessage( event );
   
           // Pop the next expected message off the list, and make sure it
           // matches the message in the event
  -        assertTrue( "Unexpected log message", m_targets.size() > 0 && m_messages.size() > 0 );
  -        assertEquals( "Unexpected log message", m_targets.remove( 0 ), event.getTarget() );
  -        assertEquals( "Unexpected log message", m_messages.remove( 0 ), event.getMessage() );
  +        assertTrue( "Unexpected log message", m_tasks.size() > 0 && m_messages.size() > 0 );
  +        assertEquals( "Incorrect task path", m_tasks.remove( 0 ), event.getPath() );
  +        assertEquals( "Incorrect log message", m_messages.remove( 0 ), event.getMessage() );
       }
   
       /**
  @@ -45,15 +49,15 @@
           super.assertComplete();
   
           // Make sure that all log messages were delivered
  -        assertTrue( "Log message not delivered", m_targets.size() == 0 && m_messages.size() == 0 );
  +        assertTrue( "Log message not delivered", m_tasks.size() == 0 && m_messages.size() == 0 );
       }
   
       /**
        * Adds an expected log message.
        */
  -    public void addExpectedMessage( String target, String message )
  +    public void addExpectedMessage( final String taskPath, final String message )
       {
  -        m_targets.add( target );
  +        m_tasks.add( taskPath );
           m_messages.add( message );
       }
   }
  
  
  
  1.1                  jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/TrackingTaskListener.java
  
  Index: TrackingTaskListener.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included  with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.myrmidon;
  
  import java.util.ArrayList;
  import junit.framework.Assert;
  import org.apache.myrmidon.api.event.TaskEvent;
  import org.apache.myrmidon.api.event.TaskListener;
  
  /**
   * A task listener that asserts that it receives a particular sequence of
   * events.
   *
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.1 $ $Date: 2002/05/11 12:44:00 $
   */
  public class TrackingTaskListener
      extends Assert
      implements TaskListener
  {
      private final ArrayList m_taskStack = new ArrayList();
      private String m_currentTask;
  
      /**
       * Notify the listener that the task is starting.
       * This is called prior to task starting.
       *
       * @param event the TaskEvent
       */
      public void taskStarting( final TaskEvent event )
      {
          m_taskStack.add( 0, m_currentTask );
          m_currentTask = event.getPath();
      }
  
      /**
       * Notify the listener that the task logged
       * a message.
       *
       * @param event the TaskEvent
       */
      public void taskMessage( final TaskEvent event )
      {
          assertEquals( "Mismatched task name", m_currentTask, event.getPath() );
      }
  
      /**
       * Notify the listener that the task has finished.
       * This is called after task has finished.
       *
       * @param event the TaskEvent
       */
      public void taskFinished( final TaskEvent event )
      {
          assertEquals( "Mismatched task name", m_currentTask, event.getPath() );
          assertTrue( m_taskStack.size() > 0 );
          m_currentTask = (String)m_taskStack.remove( 0 );
      }
  
      /**
       * Asserts that the listener has finished.
       */
      public void assertComplete()
      {
          assertNull( "Task not finished", m_currentTask );
      }
  }
  
  
  
  1.35      +2 -2      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.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- AbstractComponentTest.java	11 May 2002 08:23:31 -0000	1.34
  +++ AbstractComponentTest.java	11 May 2002 12:44:01 -0000	1.35
  @@ -60,7 +60,7 @@
    * A base class for tests for the default components.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.34 $ $Date: 2002/05/11 08:23:31 $
  + * @version $Revision: 1.35 $ $Date: 2002/05/11 12:44:01 $
    */
   public abstract class AbstractComponentTest
       extends AbstractContainerTestCase
  @@ -231,7 +231,7 @@
           final TaskEventManager eventManager = (TaskEventManager)serviceManager.lookup( TaskEventManager.ROLE );
   
           final DefaultPropertyStore store = new DefaultPropertyStore();
  -        final File baseDir = new File( "." ).getAbsoluteFile();
  +        final File baseDir = getTestDirectory();
           final ExecutionFrame frame =
               new DefaultExecutionFrame( "", baseDir, getLogger(), store, serviceManager, eventManager );
           final TaskContext context =
  
  
  
  1.9       +2 -2      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/embeddor/test/DefaultEmbeddorTest.java
  
  Index: DefaultEmbeddorTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/embeddor/test/DefaultEmbeddorTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultEmbeddorTest.java	28 Apr 2002 05:04:49 -0000	1.8
  +++ DefaultEmbeddorTest.java	11 May 2002 12:44:01 -0000	1.9
  @@ -24,7 +24,7 @@
    * Test cases for the default embeddor.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.8 $ $Date: 2002/04/28 05:04:49 $
  + * @version $Revision: 1.9 $ $Date: 2002/05/11 12:44:01 $
    */
   public class DefaultEmbeddorTest
       extends AbstractContainerTestCase
  @@ -123,7 +123,7 @@
   
           // Install a listener
           final LogMessageTracker listener = new LogMessageTracker();
  -        workspace.addProjectListener( listener );
  +        workspace.addTaskListener( listener );
   
           listener.addExpectedMessage( "main-target", "A log message" );
   
  
  
  
  1.5       +3 -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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractContainerTask.java	2 May 2002 08:52:00 -0000	1.4
  +++ AbstractContainerTask.java	11 May 2002 12:44:01 -0000	1.5
  @@ -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.4 $ $Date: 2002/05/02 08:52:00 $
  + * @version $Revision: 1.5 $ $Date: 2002/05/11 12:44:01 $
    */
   public abstract class AbstractContainerTask
       extends AbstractTask
  @@ -167,7 +167,8 @@
       protected final void executeTask( final ModelElement task )
           throws TaskException
       {
  -        m_executor.execute( task, getExecutionFrame() );
  +        final ExecutionFrame frame = getExecutionFrame().createChildFrame( task.getName(), null, null, false );
  +        m_executor.execute( task, frame );
       }
   
       /**
  
  
  
  1.1                  jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/AbstractTaskTestCase.java
  
  Index: AbstractTaskTestCase.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included  with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.myrmidon;
  
  import java.io.File;
  import org.apache.myrmidon.components.AbstractComponentTest;
  import org.apache.myrmidon.listeners.ProjectListener;
  import org.apache.myrmidon.api.event.TaskListener;
  
  /**
   * A base class for test cases which need to execute tasks.
   *
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.1 $ $Date: 2002/05/11 12:44:01 $
   *
   * @todo - Move the guts of AbstractProjectTestCase back to this class,
   *         and add a specialised project builder.
   */
  public class AbstractTaskTestCase
      extends AbstractComponentTest
  {
      public AbstractTaskTestCase( final String name )
      {
          super( name );
      }
  
      /**
       * Executes a target in a project, and asserts that it fails with the
       * given error message.
       */
      protected void executeTargetExpectError( final File projectFile,
                                               final String targetName,
                                               final String message )
      {
          executeTargetExpectError( projectFile, targetName, new String[]{message} );
      }
  
      /**
       * Executes a target in a project, and asserts that it fails with the
       * given error messages.
       */
      protected void executeTargetExpectError( final File projectFile,
                                               final String targetName,
                                               final String[] messages )
      {
          try
          {
              executeTarget( projectFile, targetName, null );
              fail( "target execution did not fail" );
          }
          catch( Exception e )
          {
              assertSameMessage( messages, e );
          }
      }
  
      /**
       * Executes a target in a project, and asserts that it does not fail.
       */
      protected void executeTarget( final File projectFile, final String targetName )
          throws Exception
      {
          executeTarget( projectFile, targetName, null );
      }
  
      /**
       * Executes a target in a project, and asserts that it does not fail.
       */
      protected void executeTarget( final File projectFile,
                                    final String targetName,
                                    final TaskListener listener )
          throws Exception
      {
          assertTrue( "not implemented", false );
      }
  }
  
  
  
  1.2       +3 -3      jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/framework/conditions/test/AndConditionTestCase.java
  
  Index: AndConditionTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/framework/conditions/test/AndConditionTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AndConditionTestCase.java	14 Apr 2002 09:33:13 -0000	1.1
  +++ AndConditionTestCase.java	11 May 2002 12:44:01 -0000	1.2
  @@ -8,16 +8,16 @@
   package org.apache.myrmidon.framework.conditions.test;
   
   import java.io.File;
  -import org.apache.myrmidon.AbstractProjectTest;
  +import org.apache.myrmidon.AbstractTaskTestCase;
   
   /**
    * Test cases for the <and> condition.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:33:13 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/11 12:44:01 $
    */
   public class AndConditionTestCase
  -    extends AbstractProjectTest
  +    extends AbstractTaskTestCase
   {
       public AndConditionTestCase( final String name )
       {
  
  
  
  1.2       +3 -3      jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/framework/conditions/test/IsSetConditionTestCase.java
  
  Index: IsSetConditionTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/framework/conditions/test/IsSetConditionTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IsSetConditionTestCase.java	14 Apr 2002 09:33:13 -0000	1.1
  +++ IsSetConditionTestCase.java	11 May 2002 12:44:01 -0000	1.2
  @@ -9,17 +9,17 @@
   
   import java.io.File;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.myrmidon.AbstractProjectTest;
  +import org.apache.myrmidon.AbstractTaskTestCase;
   import org.apache.myrmidon.framework.conditions.IsSetCondition;
   
   /**
    * Test cases for the <is-set> condition.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:33:13 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/11 12:44:01 $
    */
   public class IsSetConditionTestCase
  -    extends AbstractProjectTest
  +    extends AbstractTaskTestCase
   {
       public IsSetConditionTestCase( final String name )
       {
  
  
  
  1.2       +3 -3      jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/framework/conditions/test/IsTrueConditionTestCase.java
  
  Index: IsTrueConditionTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/framework/conditions/test/IsTrueConditionTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IsTrueConditionTestCase.java	14 Apr 2002 09:33:13 -0000	1.1
  +++ IsTrueConditionTestCase.java	11 May 2002 12:44:01 -0000	1.2
  @@ -9,17 +9,17 @@
   
   import java.io.File;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.myrmidon.AbstractProjectTest;
  +import org.apache.myrmidon.AbstractTaskTestCase;
   import org.apache.myrmidon.framework.conditions.IsTrueCondition;
   
   /**
    * Test cases for the <is-true> condition.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:33:13 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/11 12:44:01 $
    */
   public class IsTrueConditionTestCase
  -    extends AbstractProjectTest
  +    extends AbstractTaskTestCase
   {
       public IsTrueConditionTestCase( final String name )
       {
  
  
  
  1.2       +3 -3      jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/framework/conditions/test/NotConditionTestCase.java
  
  Index: NotConditionTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/framework/conditions/test/NotConditionTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NotConditionTestCase.java	14 Apr 2002 09:33:13 -0000	1.1
  +++ NotConditionTestCase.java	11 May 2002 12:44:01 -0000	1.2
  @@ -7,17 +7,17 @@
    */
   package org.apache.myrmidon.framework.conditions.test;
   
  -import org.apache.myrmidon.AbstractProjectTest;
  +import org.apache.myrmidon.AbstractTaskTestCase;
   import java.io.File;
   
   /**
    * Test cases for the <not> condition.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:33:13 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/11 12:44:01 $
    */
   public class NotConditionTestCase
  -    extends AbstractProjectTest
  +    extends AbstractTaskTestCase
   {
       public NotConditionTestCase( final String name )
       {
  
  
  
  1.2       +3 -3      jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/framework/conditions/test/OrConditionTestCase.java
  
  Index: OrConditionTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/framework/conditions/test/OrConditionTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OrConditionTestCase.java	14 Apr 2002 09:33:13 -0000	1.1
  +++ OrConditionTestCase.java	11 May 2002 12:44:01 -0000	1.2
  @@ -8,16 +8,16 @@
   package org.apache.myrmidon.framework.conditions.test;
   
   import java.io.File;
  -import org.apache.myrmidon.AbstractProjectTest;
  +import org.apache.myrmidon.AbstractTaskTestCase;
   
   /**
    * Test cases for the <or> condition.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:33:13 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/11 12:44:01 $
    */
   public class OrConditionTestCase
  -    extends AbstractProjectTest
  +    extends AbstractTaskTestCase
   {
       public OrConditionTestCase( final String name )
       {
  
  
  
  1.2       +3 -3      jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/framework/file/test/PathTestCase.java
  
  Index: PathTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/framework/file/test/PathTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PathTestCase.java	14 Apr 2002 09:33:13 -0000	1.1
  +++ PathTestCase.java	11 May 2002 12:44:01 -0000	1.2
  @@ -10,17 +10,17 @@
   import java.io.File;
   import org.apache.aut.nativelib.PathUtil;
   import org.apache.avalon.excalibur.io.FileUtil;
  -import org.apache.myrmidon.AbstractProjectTest;
  +import org.apache.myrmidon.AbstractTaskTestCase;
   import org.apache.myrmidon.LogMessageTracker;
   
   /**
    * Test-cases for the <path> data type.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:33:13 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/11 12:44:01 $
    */
   public class PathTestCase
  -    extends AbstractProjectTest
  +    extends AbstractTaskTestCase
   {
       public PathTestCase( final String name )
       {
  
  
  
  1.5       +2 -2      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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- sample.ant	3 May 2002 06:56:12 -0000	1.4
  +++ sample.ant	11 May 2002 12:44:01 -0000	1.5
  @@ -55,7 +55,7 @@
           <type-def name="log2"
               role="task"
               classname="org.apache.antlib.core.Log"
  -            classpath="../../dist/lib/core.atl" />
  +            classpath="../lib/core/core-1.0.jar" />
   
           <log2 message="Luke to Echo base. Can you hear me?"/>
       </target>
  @@ -64,7 +64,7 @@
           <converter-def classname="org.apache.myrmidon.libs.core.StringToClassConverter"
               source-type="java.lang.String"
               destination-type="java.lang.Class"
  -            classpath="../../dist/lib/core.atl" />
  +            classpath="../lib/core/core-1.0.jar" />
       </target>
   
       <target name="ant-call-test">
  
  
  

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