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/framework/src/java/org/apache/myrmidon/framework ExecuteTarget.java
Date Tue, 02 Jul 2002 07:52:25 GMT
donaldp     2002/07/02 00:52:24

  Modified:    container/src/java/org/apache/myrmidon/components/embeddor
                        DefaultEmbeddor.java
               container/src/test/org/apache/myrmidon/components/embeddor/test
                        DefaultEmbeddorTest.java
               container/src/java/org/apache/myrmidon/interfaces
                        EmbeddedAnt.java
               container/src/java/org/apache/myrmidon/interfaces/embeddor
                        Embeddor.java
               framework/src/java/org/apache/myrmidon/framework
                        ExecuteTarget.java
  Removed:     container/src/java/org/apache/myrmidon/components/embeddor
                        DefaultExecutionFrame.java
               container/src/java/org/apache/myrmidon/interfaces/embeddor
                        ExecutionFrame.java
  Log:
  ExecutionFrame goes the way of the dodo
  
  Revision  Changes    Path
  1.117     +5 -8      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.116
  retrieving revision 1.117
  diff -u -r1.116 -r1.117
  --- DefaultEmbeddor.java	2 Jul 2002 07:40:32 -0000	1.116
  +++ DefaultEmbeddor.java	2 Jul 2002 07:52:24 -0000	1.117
  @@ -38,7 +38,6 @@
   import org.apache.myrmidon.interfaces.configurer.Configurer;
   import org.apache.myrmidon.interfaces.deployer.Deployer;
   import org.apache.myrmidon.interfaces.embeddor.Embeddor;
  -import org.apache.myrmidon.interfaces.embeddor.ExecutionFrame;
   import org.apache.myrmidon.interfaces.library.Library;
   import org.apache.myrmidon.interfaces.library.LibraryManager;
   import org.apache.myrmidon.interfaces.model.Project;
  @@ -111,7 +110,7 @@
       /**
        * Creates an execution frame.
        */
  -    public ExecutionFrame createExecutionFrame( final Map properties,
  +    public AntServiceKernel createExecutionFrame( final Map properties,
                                                   final Project[] projects )
           throws Exception
       {
  @@ -136,7 +135,7 @@
               }
           }
   
  -        return new DefaultExecutionFrame( serviceKernel );
  +        return serviceKernel;
       }
   
       /**
  @@ -272,15 +271,13 @@
       /**
        * Executes a set of targets in a new workspace.
        */
  -    public void execute( final ExecutionFrame frame,
  +    public void execute( final AntServiceKernel frame,
                            final ProjectDescriptor project,
                            final String[] targets )
           throws TaskException
       {
  -        final AntServiceKernel serviceKernel =
  -            (AntServiceKernel)frame.lookup( AntServiceKernel.ROLE );
           final DefaultTaskContext context =
  -            new DefaultTaskContext( "", "", "", new File("."), serviceKernel );
  +            new DefaultTaskContext( "", "", "", new File("."), frame );
   
           final Workspace workspace = createWorkspace( context );
           if( targets == null || targets.length == 0 )
  
  
  
  1.41      +4 -4      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.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- DefaultEmbeddorTest.java	2 Jul 2002 02:18:09 -0000	1.40
  +++ DefaultEmbeddorTest.java	2 Jul 2002 07:52:24 -0000	1.41
  @@ -18,9 +18,9 @@
   import org.apache.myrmidon.components.embeddor.DefaultEmbeddor;
   import org.apache.myrmidon.interfaces.embeddor.Embeddor;
   import org.apache.myrmidon.interfaces.event.TaskEventManager;
  -import org.apache.myrmidon.interfaces.embeddor.ExecutionFrame;
   import org.apache.myrmidon.interfaces.model.Project;
   import org.apache.myrmidon.interfaces.workspace.ProjectDescriptor;
  +import org.apache.myrmidon.interfaces.service.AntServiceKernel;
   
   /**
    * Test cases for the default embeddor.
  @@ -128,12 +128,12 @@
           final Project project = embeddor.createProject( descriptor, null );
   
           // Build the workspace
  -        final ExecutionFrame frame = embeddor.createExecutionFrame( new HashMap(), null
);
  +        final AntServiceKernel frame = embeddor.createExecutionFrame( new HashMap(), null
);
   
           // Install a listener
           final LogMessageTracker listener = new LogMessageTracker();
           final TaskEventManager taskEventManager =
  -            (TaskEventManager)frame.lookup( TaskEventManager.ROLE );
  +            (TaskEventManager)frame.getService( TaskEventManager.ROLE );
           taskEventManager.addTaskListener( listener );
   
           listener.addExpectedMessage( "main-target", "A log message" );
  
  
  
  1.35      +6 -6      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.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- EmbeddedAnt.java	2 Jul 2002 03:30:57 -0000	1.34
  +++ EmbeddedAnt.java	2 Jul 2002 07:52:24 -0000	1.35
  @@ -23,8 +23,8 @@
   import org.apache.myrmidon.api.metadata.ModelElement;
   import org.apache.myrmidon.interfaces.embeddor.Embeddor;
   import org.apache.myrmidon.interfaces.event.TaskEventManager;
  -import org.apache.myrmidon.interfaces.embeddor.ExecutionFrame;
   import org.apache.myrmidon.interfaces.workspace.ProjectDescriptor;
  +import org.apache.myrmidon.interfaces.service.AntServiceKernel;
   
   /**
    * A utility class, that takes care of launching Myrmidon, and building and
  @@ -162,7 +162,7 @@
           final Embeddor embeddor = prepareEmbeddor( embeddorParameters );
           final ProjectDescriptor descriptor = prepareProjectDescriptor();
   
  -        final ExecutionFrame frame =
  +        final AntServiceKernel frame =
               embeddor.createExecutionFrame( m_workspaceProperties, null );
           prepareListeners( embeddor, frame );
   
  @@ -193,7 +193,7 @@
       /**
        * Actually do the build.
        */
  -    private void executeTargets( final ExecutionFrame frame,
  +    private void executeTargets( final AntServiceKernel frame,
                                    final ProjectDescriptor descriptor,
                                    final String[] targets )
           throws TaskException
  @@ -281,11 +281,11 @@
        * Prepares and returns the project listener to use.
        */
       private void prepareListeners( final Embeddor embeddor,
  -                                   final ExecutionFrame frame )
  +                                   final AntServiceKernel frame )
           throws Exception
       {
           final TaskEventManager eventManager =
  -            (TaskEventManager)frame.lookup( TaskEventManager.ROLE );
  +            (TaskEventManager)frame.getService( TaskEventManager.ROLE );
           final int count = m_listeners.size();
           for( int i = 0; i < count; i++ )
           {
  
  
  
  1.31      +5 -4      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/embeddor/Embeddor.java
  
  Index: Embeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/embeddor/Embeddor.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Embeddor.java	2 Jul 2002 02:18:09 -0000	1.30
  +++ Embeddor.java	2 Jul 2002 07:52:24 -0000	1.31
  @@ -14,6 +14,7 @@
   import org.apache.myrmidon.api.metadata.ModelElement;
   import org.apache.myrmidon.interfaces.model.Project;
   import org.apache.myrmidon.interfaces.workspace.ProjectDescriptor;
  +import org.apache.myrmidon.interfaces.service.AntServiceKernel;
   
   /**
    * Interface through which you embed Myrmidon into applications.
  @@ -52,7 +53,7 @@
           throws Exception;
   
       /**
  -     * Creates an {@link org.apache.myrmidon.interfaces.embeddor.ExecutionFrame} that can
be used to execute projects.
  +     * Creates an {@link AntServiceKernel} that can be used to execute projects.
        * Note that the set of {@link Project} objects allows the model object used
        * by GUI to be the same model as used by the engine.
        *
  @@ -65,7 +66,7 @@
        * @return the ExecutionFrame
        * @throws Exception If the frame could not be created.
        */
  -    ExecutionFrame createExecutionFrame( Map properties, Project[] projects )
  +    AntServiceKernel createExecutionFrame( Map properties, Project[] projects )
           throws Exception;
   
       /**
  @@ -79,7 +80,7 @@
        * @param targets the targets to execute (May be null).
        * @throws TaskException if error executing targets
        */
  -    void execute( ExecutionFrame frame,
  +    void execute( AntServiceKernel frame,
                     ProjectDescriptor project,
                     String[] targets )
           throws TaskException;
  
  
  
  1.27      +3 -3      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.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- ExecuteTarget.java	2 Jul 2002 02:18:09 -0000	1.26
  +++ ExecuteTarget.java	2 Jul 2002 07:52:24 -0000	1.27
  @@ -15,8 +15,8 @@
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.interfaces.embeddor.Embeddor;
  -import org.apache.myrmidon.interfaces.embeddor.ExecutionFrame;
   import org.apache.myrmidon.interfaces.workspace.ProjectDescriptor;
  +import org.apache.myrmidon.interfaces.service.AntServiceKernel;
   
   /**
    * A utility class that simplifies executing a target in a new workspace.
  @@ -99,7 +99,7 @@
   
           try
           {
  -            final ExecutionFrame frame = embeddor.createExecutionFrame( properties, null
);
  +            final AntServiceKernel frame = embeddor.createExecutionFrame( properties, null
);
               embeddor.execute( frame, m_project, m_targets );
           }
           catch( final Exception e )
  
  
  

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