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 Thu, 13 Jun 2002 04:01:05 GMT
donaldp     2002/06/12 21:01:04

  Modified:    framework/src/java/org/apache/myrmidon/framework
                        ExecuteTarget.java
  Log:
  No need to build project as can just pass through the ProjectDescriptor
  
  Revision  Changes    Path
  1.21      +4 -28     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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- ExecuteTarget.java	13 Jun 2002 03:52:32 -0000	1.20
  +++ ExecuteTarget.java	13 Jun 2002 04:01:04 -0000	1.21
  @@ -17,7 +17,6 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.interfaces.embeddor.Embeddor;
   import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
  -import org.apache.myrmidon.interfaces.model.Project;
   import org.apache.myrmidon.interfaces.workspace.ProjectDescriptor;
   
   /**
  @@ -99,43 +98,20 @@
           throws TaskException
       {
           final Embeddor embeddor = (Embeddor)context.getService( Embeddor.class );
  -        final Project project = buildProject( embeddor );
           final Map properties = buildParameters( context );
   
  -        String targetName = m_target;
  -        if( null == targetName )
  -        {
  -            targetName = project.getDefaultTargetName();
  -        }
  -
           try
           {
               // TODO - need to be able to inherit services (TypeManager specifically)
               final ExecutionFrame frame = embeddor.createExecutionFrame( properties );
  -            embeddor.execute( frame, project.getProjectDescriptor(), targetName );
  +            embeddor.execute( frame, m_project, m_target );
           }
           catch( final Exception e )
           {
               final String message =
                   REZ.getString( "execute-targetName.execute.error",
  -                               project.getProjectName(),
  -                               targetName );
  -            throw new TaskException( message, e );
  -        }
  -    }
  -
  -    /**
  -     * Returns the project to execute.
  -     */
  -    private Project buildProject( final Embeddor embeddor ) throws TaskException
  -    {
  -        try
  -        {
  -            return embeddor.createProject( m_project );
  -        }
  -        catch( final Exception e )
  -        {
  -            final String message = REZ.getString( "execute-target.create-project.error"
);
  +                               m_project.getUri(),
  +                               m_target );
               throw new TaskException( message, 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