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/container/src/java/org/apache/myrmidon/components/builder DefaultProjectBuilder.java
Date Tue, 04 Jun 2002 12:36:17 GMT
adammurdoch    2002/06/04 05:36:17

  Modified:    container/src/java/org/apache/myrmidon/components/builder
                        DefaultProjectBuilder.java
  Log:
  Allow subclasses to override how a Target gets created from
  its model (eg to swap in a different target task).
  
  Revision  Changes    Path
  1.66      +12 -3     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.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- DefaultProjectBuilder.java	2 Jun 2002 14:08:05 -0000	1.65
  +++ DefaultProjectBuilder.java	4 Jun 2002 12:36:17 -0000	1.66
  @@ -34,7 +34,7 @@
    * Default implementation to construct project from a build file.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.65 $ $Date: 2002/06/02 14:08:05 $
  + * @version $Revision: 1.66 $ $Date: 2002/06/04 12:36:17 $
    *
    * @ant.type type="project-builder" name="ant2"
    */
  @@ -186,6 +186,15 @@
       }
   
       /**
  +     * Creates a target from its model.
  +     */
  +    protected Target createTarget( final DefaultProject project,
  +                                   final ModelElement model )
  +    {
  +        return new Target( project, model );
  +    }
  +
  +    /**
        * Verify that the actual version complies with expected
        * version. See {@link Version#complies(Version)} for details
        * on version compliance.
  @@ -391,7 +400,7 @@
   
               if( name.equals( "target" ) )
               {
  -                project.addTarget( new Target( project, element ) );
  +                project.addTarget( createTarget( project, element ) );
               }
               else
               {
  @@ -401,7 +410,7 @@
                   throw new ProjectException( message );
               }
           }
  -        project.addTarget( new Target( project, implicit ) );
  +        project.addTarget( createTarget( project, implicit ) );
       }
   
       private ProjectRef buildProjectRef( final File baseDirectory,
  
  
  

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