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, 23 Apr 2002 01:54:47 GMT
adammurdoch    02/04/22 18:54:47

  Modified:    container/src/java/org/apache/myrmidon/components/builder
                        DefaultProjectBuilder.java
  Log:
  Make sure text content is copied across.
  
  Revision  Changes    Path
  1.46      +13 -9     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.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- DefaultProjectBuilder.java	21 Apr 2002 01:47:38 -0000	1.45
  +++ DefaultProjectBuilder.java	23 Apr 2002 01:54:47 -0000	1.46
  @@ -35,7 +35,7 @@
    * Default implementation to construct project from a build file.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.45 $ $Date: 2002/04/21 01:47:38 $
  + * @version $Revision: 1.46 $ $Date: 2002/04/23 01:54:47 $
    *
    * @ant.type type="project-builder" name="ant2"
    */
  @@ -280,7 +280,7 @@
       private void buildTopLevelProject( final DefaultProject project,
                                          final Configuration configuration,
                                          final HashMap projects )
  -        throws ProjectException
  +        throws Exception
       {
           final ArrayList implicitTaskList = new ArrayList();
           final Configuration[] children = configuration.getChildren();
  @@ -353,6 +353,7 @@
       }
   
       private ModelElement[] toModelElements( final Configuration[] implicitTasks )
  +        throws Exception
       {
           final ModelElement[] elements = new ModelElement[ implicitTasks.length ];
           for( int i = 0; i < elements.length; i++ )
  @@ -363,27 +364,30 @@
           return elements;
       }
   
  -    private ModelElement toModelElement( final Configuration task )
  +    private ModelElement toModelElement( final Configuration config )
  +        throws Exception
       {
           final ModelElement model =
  -            new ModelElement( task.getName(),
  -                              task.getLocation() );
  +            new ModelElement( config.getName(),
  +                              config.getLocation() );
   
  -        final Configuration[] children = task.getChildren();
  +        final Configuration[] children = config.getChildren();
           for( int i = 0; i < children.length; i++ )
           {
               final ModelElement child = toModelElement( children[ i ] );
               model.addChild( child );
           }
   
  -        final String[] names = task.getAttributeNames();
  +        final String[] names = config.getAttributeNames();
           for( int i = 0; i < names.length; i++ )
           {
               final String name = names[ i ];
  -            final String value = task.getAttribute( name, null );
  +            final String value = config.getAttribute( name, null );
               model.setAttribute( name, value );
           }
   
  +        model.setContent( config.getValue( null ) );
  +
           return model;
       }
   
  @@ -491,7 +495,7 @@
        * @param target the Configuration
        */
       private void buildTarget( final DefaultProject project, final Configuration target
)
  -        throws ProjectException
  +        throws Exception
       {
           final String name = target.getAttribute( "name", null );
           final String depends = target.getAttribute( "depends", null );
  
  
  

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