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/java/org/apache/myrmidon/interfaces/project ProjectManager.java
Date Thu, 13 Jun 2002 03:52:33 GMT
donaldp     2002/06/12 20:52:32

  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/components/builder
                        DefaultProjectBuilder.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
  Added:       container/src/java/org/apache/myrmidon/interfaces/project
                        ProjectManager.java
  Log:
  Embeddor executes project based on ProjectDescriptor rather than based on project object.
  
  Revision  Changes    Path
  1.93      +4 -3      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.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- DefaultEmbeddor.java	13 Jun 2002 03:31:42 -0000	1.92
  +++ DefaultEmbeddor.java	13 Jun 2002 03:52:32 -0000	1.93
  @@ -256,13 +256,14 @@
           m_context = null;
       }
   
  +
       public void execute( final ExecutionFrame frame,
  -                         final Project project,
  +                         final ProjectDescriptor project,
                            final String target )
           throws TaskException
       {
           final Workspace workspace = createWorkspace( frame );
  -        workspace.execute( project.getProjectDescriptor(), target );
  +        workspace.execute( project, target );
       }
   
       /**
  
  
  
  1.34      +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.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- DefaultEmbeddorTest.java	13 Jun 2002 02:59:25 -0000	1.33
  +++ DefaultEmbeddorTest.java	13 Jun 2002 03:52:32 -0000	1.34
  @@ -140,7 +140,7 @@
   
           // Execute the default target
           final String defaultTargetName = project.getDefaultTargetName();
  -        embeddor.execute( frame, project, defaultTargetName );
  +        embeddor.execute( frame, project.getProjectDescriptor(), defaultTargetName );
   
           // Cleanup
           listener.assertComplete();
  
  
  
  1.81      +6 -6      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/DefaultProjectBuilder.java
  
  Index: DefaultProjectBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/DefaultProjectBuilder.java,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- DefaultProjectBuilder.java	13 Jun 2002 02:59:26 -0000	1.80
  +++ DefaultProjectBuilder.java	13 Jun 2002 03:52:32 -0000	1.81
  @@ -79,7 +79,7 @@
        *
        * @param source the source to transform
        * @return the file object
  -     * @throws ProjectException if malformed source
  +     * @throws org.apache.myrmidon.interfaces.builder.ProjectException if malformed source
        */
       private File toFile( final String source )
           throws ProjectException
  @@ -107,7 +107,7 @@
        *
        * @param descriptor the project descriptor
        * @return the create Project object
  -     * @throws ProjectException if error building project
  +     * @throws org.apache.myrmidon.interfaces.builder.ProjectException if error building
project
        */
       public Project build( final ProjectDescriptor descriptor )
           throws ProjectException
  @@ -204,7 +204,7 @@
        * on version compliance.
        *
        * @param version the version to check
  -     * @throws ProjectException if specified version is not compliant
  +     * @throws org.apache.myrmidon.interfaces.builder.ProjectException if specified version
is not compliant
        */
       private void verifyVersion( final Version version )
           throws ProjectException
  @@ -223,7 +223,7 @@
        * Verify "project" is the name of the top level element.
        *
        * @param model the model to check
  -     * @throws ProjectException if top level element is not "project"
  +     * @throws org.apache.myrmidon.interfaces.builder.ProjectException if top level element
is not "project"
        */
       private void verifyTopLevelProject( final ModelElement model )
           throws ProjectException
  @@ -335,7 +335,7 @@
        *
        * @param baseDirectory the basedir of project
        * @param model the model
  -     * @throws ProjectException if an error occurs
  +     * @throws org.apache.myrmidon.interfaces.builder.ProjectException if an error occurs
        */
       private void buildTopLevelProject( final File baseDirectory,
                                          final ModelElement model,
  
  
  
  1.26      +4 -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.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- EmbeddedAnt.java	13 Jun 2002 02:59:26 -0000	1.25
  +++ EmbeddedAnt.java	13 Jun 2002 03:52:32 -0000	1.26
  @@ -216,15 +216,15 @@
           //if we didn't specify a target, then choose default
           if( targets == null || targets.length == 0 )
           {
  -            final String targetName = project.getDefaultTargetName();
  +            //final String targetName = project.getDefaultTargetName();
               //Next line an utter hack - need to rejif it completely
  -            m_embeddor.execute( frame, project, targetName );
  +            m_embeddor.execute( frame, project.getProjectDescriptor(), null );
           }
           else
           {
               for( int i = 0; i < targets.length; i++ )
               {
  -                m_embeddor.execute( frame, project, targets[ i ] );
  +                m_embeddor.execute( frame, project.getProjectDescriptor(), targets[ i ]
);
               }
           }
       }
  
  
  
  1.25      +2 -2      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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Embeddor.java	13 Jun 2002 02:59:26 -0000	1.24
  +++ Embeddor.java	13 Jun 2002 03:52:32 -0000	1.25
  @@ -59,7 +59,7 @@
           throws Exception;
   
       void execute( ExecutionFrame frame,
  -                  Project project,
  +                  ProjectDescriptor project,
                     String target )
           throws TaskException;
   }
  
  
  
  1.20      +3 -4      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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ExecuteTarget.java	13 Jun 2002 02:59:26 -0000	1.19
  +++ ExecuteTarget.java	13 Jun 2002 03:52:32 -0000	1.20
  @@ -111,9 +111,8 @@
           try
           {
               // TODO - need to be able to inherit services (TypeManager specifically)
  -            final ExecutionFrame frame =
  -                embeddor.createExecutionFrame( properties );
  -            embeddor.execute( frame, project, targetName );
  +            final ExecutionFrame frame = embeddor.createExecutionFrame( properties );
  +            embeddor.execute( frame, project.getProjectDescriptor(), targetName );
           }
           catch( final Exception e )
           {
  
  
  
  1.1                  jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/project/ProjectManager.java
  
  Index: ProjectManager.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.interfaces.project;
  
  import org.apache.myrmidon.interfaces.model.Project;
  import org.apache.myrmidon.interfaces.workspace.ProjectDescriptor;
  import org.apache.myrmidon.interfaces.builder.ProjectException;
  
  /**
   * This service is responsible for managing a set of
   * {@link Project} objects. The Project objects are maintained
   * These Project objects are
   * within
   *
   * @author <a href="mailto:peter@apache.org">Peter Donald</a>
   * @version $Revision: 1.1 $ $Date: 2002/06/13 03:52:32 $
   */
  public interface ProjectManager
  {
      String ROLE = ProjectManager.class.getName();
  
      void addProject( Project project )
          throws ProjectException;
  
      void removeProject( Project project )
          throws ProjectException;
  
      Project getProject( ProjectDescriptor descriptor )
          throws ProjectException;
  
      Project[] listProjects()
          throws ProjectException;
  }
  
  
  

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