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/container/src/test/org/apache/myrmidon/components/embeddor/test DefaultEmbeddorTest.java
Date Tue, 21 May 2002 05:49:13 GMT
donaldp     02/05/20 22:49:13

  Modified:    antlib/src/java/org/apache/antlib/sound SoundTask.java
               framework/src/java/org/apache/myrmidon/framework
                        ExecuteTarget.java
               container/src/test/org/apache/myrmidon/components/embeddor/test
                        DefaultEmbeddorTest.java
  Log:
  Fix some compile errors
  
  Revision  Changes    Path
  1.4       +5 -4      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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SoundTask.java	18 May 2002 04:19:34 -0000	1.3
  +++ SoundTask.java	21 May 2002 05:49:12 -0000	1.4
  @@ -14,7 +14,7 @@
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.myrmidon.api.AbstractTask;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.interfaces.workspace.Workspace;
  +import org.apache.myrmidon.interfaces.event.TaskEventManager;
   import org.apache.myrmidon.framework.listener.TaskToProjectListenerAdapter;
   
   /**
  @@ -30,7 +30,7 @@
    * @ant.task name="sound-listener"
    * @author Nick Pellow
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.3 $, $Date: 2002/05/18 04:19:34 $
  + * @version $Revision: 1.4 $, $Date: 2002/05/21 05:49:12 $
    */
   public class SoundTask
       extends AbstractTask
  @@ -81,8 +81,9 @@
                                                m_fail.getDuration() );
           }
   
  -        final Workspace workspace = (Workspace)getContext().getService( Workspace.class
);
  -        workspace.addTaskListener( new TaskToProjectListenerAdapter( soundPlayer ) );
  +        final TaskEventManager eventManager =
  +            (TaskEventManager)getContext().getService( TaskEventManager.class );
  +        eventManager.addTaskListener( new TaskToProjectListenerAdapter( soundPlayer ) );
       }
   
       /**
  
  
  
  1.4       +6 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/ExecuteTarget.java
  
  Index: ExecuteTarget.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/ExecuteTarget.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ExecuteTarget.java	10 May 2002 06:18:12 -0000	1.3
  +++ ExecuteTarget.java	21 May 2002 05:49:13 -0000	1.4
  @@ -15,6 +15,7 @@
   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.interfaces.executor.ExecutionFrame;
   
   /**
    * A utility class that simplifies executing a target in a project.
  @@ -22,7 +23,7 @@
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.3 $ $Date: 2002/05/10 06:18:12 $
  + * @version $Revision: 1.4 $ $Date: 2002/05/21 05:49:13 $
    */
   public class ExecuteTarget
   {
  @@ -101,13 +102,16 @@
               final Workspace workspace =
                   embeddor.createWorkspace( buildParameters( context ) );
   
  +            final ExecutionFrame frame =
  +                embeddor.createExecutionFrame( buildParameters( context ) );
  +
               String target = m_target;
               if( null == target )
               {
                   target = project.getDefaultTargetName();
               }
   
  -            workspace.executeProject( project, target );
  +            workspace.executeProject( project, frame, target );
           }
           catch( final Exception e )
           {
  
  
  
  1.13      +5 -3      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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DefaultEmbeddorTest.java	21 May 2002 01:53:03 -0000	1.12
  +++ DefaultEmbeddorTest.java	21 May 2002 05:49:13 -0000	1.13
  @@ -19,12 +19,13 @@
   import org.apache.myrmidon.interfaces.oldmodel.Project;
   import org.apache.myrmidon.interfaces.oldmodel.Target;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
  +import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
   
   /**
    * Test cases for the default embeddor.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.12 $ $Date: 2002/05/21 01:53:03 $
  + * @version $Revision: 1.13 $ $Date: 2002/05/21 05:49:13 $
    */
   public class DefaultEmbeddorTest
       extends AbstractContainerTestCase
  @@ -119,16 +120,17 @@
   
           // Build the workspace
           final Workspace workspace = embeddor.createWorkspace( new HashMap() );
  +        final ExecutionFrame frame = embeddor.createExecutionFrame( new HashMap() );
   
           // Install a listener
           final LogMessageTracker listener = new LogMessageTracker();
  -        workspace.addTaskListener( listener );
  +        frame.getTaskEventManager().addTaskListener( listener );
   
           listener.addExpectedMessage( "main-target", "A log message" );
   
           // Execute the default target
           final String target = project.getDefaultTargetName();
  -        workspace.executeProject( project, target );
  +        workspace.executeProject( project, frame, target );
   
           // Cleanup
           listener.assertComplete();
  
  
  

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