You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by ad...@apache.org on 2002/05/12 13:18:39 UTC

cvs commit: jakarta-ant-myrmidon/site/src/xdocs buildfile.xml

adammurdoch    02/05/12 04:18:39

  Modified:    antlib/src/java/org/apache/antlib/project
                        Resources.properties
               antlib/src/java/org/apache/antlib/runtime
                        Resources.properties
               container/src/java/org/apache/myrmidon/components/builder
                        ConvertingProjectBuilder.java DefaultProject.java
                        DefaultProjectBuilder.java Resources.properties
               container/src/java/org/apache/myrmidon/components/workspace
                        DefaultWorkspace.java
               container/src/java/org/apache/myrmidon/interfaces/oldmodel
                        Project.java
               container/src/test/org/apache/myrmidon/components/builder/test
                        DefaultProjectBuilderTestCase.java
               container/src/test/org/apache/myrmidon/components/embeddor/test
                        DefaultEmbeddorTest.java
               myrmidon/src/samples namespace-test.ant
               site/src/xdocs buildfile.xml
  Added:       antlib/src/java/org/apache/antlib/runtime
                        AbstractTypeLibTask.java ImportTask.java
                        TypeLibTask.java
  Removed:     antlib/src/java/org/apache/antlib/project TypeLibTask.java
               antlib/src/java/org/apache/antlib/runtime Import.java
               container/src/java/org/apache/myrmidon/interfaces/oldmodel
                        TypeLib.java
  Log:
  * Removed the <import> top-level project file element, and corresponding TypeLib.
  
  * Swapped the names of the <import> and <typelib> tasks.  Now, <import> loads
    an antlib by name, <typelib> loads an antlib by filename.  Moved <import> to
    the runtime antlib, and added an abstract superclass for both tasks.
  
  Revision  Changes    Path
  1.6       +0 -5      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/project/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/project/Resources.properties,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Resources.properties	5 May 2002 12:46:59 -0000	1.5
  +++ Resources.properties	12 May 2002 11:18:38 -0000	1.6
  @@ -6,11 +6,6 @@
   target.bad-dependency.error=Discovered empty dependency in target "{0}" at {1}.
   target.exec-depends.notice=Executing target "{0}"s dependencies: {1}
   
  -typelib.missing-library.error=Missing library attribute from typelib statement.
  -typelib.missing-name.error=Specified role ("{0}") but missing name from typelib statement.
  -typelib.missing-role.error=Specified name ("{0}") but missing role from typelib statement.
  -typelib.no-deploy.error=Could not import types from Type Library "{0}".
  -
   param.noname.error=Missing name from parameter.
   param.novalue.error=Missing value from parameter "{0}".
   
  
  
  
  1.4       +6 -5      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/runtime/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/runtime/Resources.properties,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Resources.properties	3 May 2002 06:56:10 -0000	1.3
  +++ Resources.properties	12 May 2002 11:18:39 -0000	1.4
  @@ -1,9 +1,10 @@
  -facility.no-create.error=Failed to create aspect handler of type {0}.
  -facility.multi-element.error=Expected one sub-element to configure facility.
  -facility.no-namespace.error=Must specify namespace parameter.
  +import.missing-library.error=No library name specified.
   
  -import.no-lib.error=Must specify lib parameter.
  -import.no-deploy.error=Could not  import types from library "{0}".
  +typelib.no-lib.error=No library path specified.
   
   typeavailable.no-type-name.error=No type name was specified.
   typeavailable.evaluate.error=Could not determine if type "{0}" is available.
  +
  +abstracttypelib.missing-name.error=Specified role ("{0}") but missing type name.
  +abstracttypelib.missing-role.error=Specified name ("{0}") but missing role name..
  +abstracttypelib.no-deploy.error=Could not import types from Type Library.
  
  
  
  1.1                  jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/runtime/AbstractTypeLibTask.java
  
  Index: AbstractTypeLibTask.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.antlib.runtime;
  
  import org.apache.myrmidon.api.AbstractTask;
  import org.apache.myrmidon.api.TaskException;
  import org.apache.myrmidon.interfaces.library.Library;
  import org.apache.myrmidon.interfaces.deployer.Deployer;
  import org.apache.myrmidon.interfaces.deployer.TypeLibraryDeployer;
  import org.apache.avalon.excalibur.i18n.Resources;
  import org.apache.avalon.excalibur.i18n.ResourceManager;
  
  /**
   * An abstract task to import types from a typelib.
   *
   * @author <a href="mailto:peter@apache.org">Peter Donald</a>
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.1 $ $Date: 2002/05/12 11:18:39 $
   */
  public abstract class AbstractTypeLibTask
      extends AbstractTask
  {
      private static final Resources REZ =
          ResourceManager.getPackageResources( AbstractTypeLibTask.class );
  
      private String m_namespace;
      private String m_name;
      private String m_role;
  
      public void setNamespace( final String namespace )
      {
          m_namespace = namespace;
      }
  
      public void setName( final String name )
      {
          m_name = name;
      }
  
      public void setRole( final String role )
      {
          m_role = role;
      }
  
      public void execute()
          throws TaskException
      {
          validate();
          deployTypeLib();
      }
  
      /**
       * Make sure valid parameters are passed to task.
       *
       * @throws TaskException if invalid parameters passed to task
       */
      protected void validate()
          throws TaskException
      {
          if( null == m_name && null == m_role )
          {
              return;
          }
          else if( null == m_name )
          {
              final String message =
                  REZ.getString( "abstracttypelib.missing-name.error", m_role );
              throw new TaskException( message );
          }
          else if( null == m_role )
          {
              final String message =
                  REZ.getString( "abstracttypelib.missing-role.error", m_name );
              throw new TaskException( message );
          }
      }
  
      /**
       * Actually do work of deploying type library.
       *
       * @throws TaskException if error occured deploying library
       */
      private void deployTypeLib()
          throws TaskException
      {
          try
          {
              final Library library = getLibrary();
              if( m_namespace == null )
              {
                  m_namespace = library.getName();
              }
  
              final Deployer deployer = (Deployer)getService( Deployer.class );
              final TypeLibraryDeployer typeDeployer = deployer.createDeployer( library, m_namespace );
              if( null == m_role )
              {
                  // Deploy everything in the typelib
                  typeDeployer.deployAll();
              }
              else
              {
                  // Deploy the specified type
                  typeDeployer.deployType( m_role, m_name );
              }
          }
          catch( final Exception e )
          {
              final String message =
                  REZ.getString( "abstracttypelib.no-deploy.error" );
              throw new TaskException( message, e );
          }
      }
  
      /**
       * Returns the library to import from.
       */
      protected abstract Library getLibrary() throws Exception;
  }
  
  
  
  1.1                  jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/runtime/ImportTask.java
  
  Index: ImportTask.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.antlib.runtime;
  
  import org.apache.antlib.runtime.AbstractTypeLibTask;
  import org.apache.myrmidon.interfaces.library.Library;
  import org.apache.myrmidon.interfaces.library.TypeLibraryManager;
  import org.apache.myrmidon.api.TaskException;
  import org.apache.avalon.excalibur.i18n.ResourceManager;
  import org.apache.avalon.excalibur.i18n.Resources;
  
  /**
   * Task to import a typeLib.
   *
   * @author <a href="mailto:peter@apache.org">Peter Donald</a>
   * @ant.task name="import"
   */
  public class ImportTask
      extends AbstractTypeLibTask
  {
      private static final Resources REZ =
          ResourceManager.getPackageResources( ImportTask.class );
  
      private String m_library;
  
      public void setLibrary( final String library )
      {
          m_library = library;
      }
  
      /**
       * Make sure valid parameters are passed to task.
       */
      protected void validate()
          throws TaskException
      {
          super.validate();
          if( null == m_library )
          {
              final String message =
                  REZ.getString( "import.missing-library.error" );
              throw new TaskException( message );
          }
      }
  
      /**
       * Returns the library to import from.
       */
      protected Library getLibrary() throws Exception
      {
          final TypeLibraryManager libraryManager = (TypeLibraryManager)getService( TypeLibraryManager.class );
          final Library library = libraryManager.getTypeLibrary( m_library );
          return library;
      }
  }
  
  
  
  1.1                  jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/runtime/TypeLibTask.java
  
  Index: TypeLibTask.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.antlib.runtime;
  
  import java.io.File;
  import org.apache.avalon.excalibur.i18n.ResourceManager;
  import org.apache.avalon.excalibur.i18n.Resources;
  import org.apache.myrmidon.api.TaskException;
  import org.apache.myrmidon.interfaces.library.Library;
  import org.apache.myrmidon.interfaces.library.LibraryManager;
  
  /**
   * Task to import a typelib from a file.
   *
   * @author <a href="mailto:peter@apache.org">Peter Donald</a>
   * @ant.task name="typelib"
   */
  public class TypeLibTask
      extends AbstractTypeLibTask
  {
      private static final Resources REZ =
          ResourceManager.getPackageResources( TypeLibTask.class );
  
      private File m_lib;
  
      public void setFile( final File lib )
      {
          m_lib = lib;
      }
  
      /**
       * Make sure valid parameters are passed to task.
       */
      protected void validate()
          throws TaskException
      {
          super.validate();
          if( null == m_lib )
          {
              final String message = REZ.getString( "typelib.no-lib.error" );
              throw new TaskException( message );
          }
      }
  
      /**
       * Returns the library to import from.
       */
      protected Library getLibrary() throws Exception
      {
          final LibraryManager libraryManager = (LibraryManager)getService( LibraryManager.class );
          return libraryManager.createLibrary( null, new File[] { m_lib } );
      }
  }
  
  
  
  1.7       +3 -3      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/ConvertingProjectBuilder.java
  
  Index: ConvertingProjectBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/ConvertingProjectBuilder.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ConvertingProjectBuilder.java	10 May 2002 06:27:31 -0000	1.6
  +++ ConvertingProjectBuilder.java	12 May 2002 11:18:39 -0000	1.7
  @@ -18,7 +18,7 @@
    * configuration into a Myrmidon one.
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.6 $ $Date: 2002/05/10 06:27:31 $
  + * @version $Revision: 1.7 $ $Date: 2002/05/12 11:18:39 $
    *
    * @ant.type type="project-builder" name="xml"
    * @ant.type type="project-builder" name="ant"
  @@ -59,9 +59,9 @@
           omitAttributes.add( VERSION_ATTRIBUTE );
           copyAttributes( originalConfig, newConfig, omitAttributes );
   
  -        // Add a "typelib" task for the ant1compat stuff
  +        // Add an "import" task for the ant1compat stuff
           DefaultConfiguration typelibDeclaration =
  -            new DefaultConfiguration( "typelib", originalConfig.getLocation() );
  +            new DefaultConfiguration( "import", originalConfig.getLocation() );
           typelibDeclaration.setAttribute( "library", "ant1" );
           newConfig.addChild( typelibDeclaration );
   
  
  
  
  1.7       +1 -25     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/DefaultProject.java
  
  Index: DefaultProject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/DefaultProject.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DefaultProject.java	28 Apr 2002 05:04:48 -0000	1.6
  +++ DefaultProject.java	12 May 2002 11:18:39 -0000	1.7
  @@ -8,19 +8,17 @@
   package org.apache.myrmidon.components.builder;
   
   import java.io.File;
  -import java.util.ArrayList;
   import java.util.HashMap;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.myrmidon.interfaces.oldmodel.Project;
   import org.apache.myrmidon.interfaces.oldmodel.Target;
  -import org.apache.myrmidon.interfaces.oldmodel.TypeLib;
   
   /**
    * Default project implementation.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.6 $ $Date: 2002/04/28 05:04:48 $
  + * @version $Revision: 1.7 $ $Date: 2002/05/12 11:18:39 $
    */
   public class DefaultProject
       implements Project
  @@ -28,9 +26,6 @@
       private static final Resources REZ =
           ResourceManager.getPackageResources( DefaultProject.class );
   
  -    ///The imports
  -    private final ArrayList m_imports = new ArrayList();
  -
       ///The projects refferred to by this project
       private final HashMap m_projects = new HashMap();
   
  @@ -67,16 +62,6 @@
       }
   
       /**
  -     * Get the imports for project.
  -     *
  -     * @return the imports
  -     */
  -    public TypeLib[] getTypeLibs()
  -    {
  -        return (TypeLib[])m_imports.toArray( new TypeLib[ 0 ] );
  -    }
  -
  -    /**
        * Get names of projects referred to by this project.
        *
        * @return the names
  @@ -176,15 +161,6 @@
       public final void setBaseDirectory( final File baseDirectory )
       {
           m_baseDirectory = baseDirectory;
  -    }
  -
  -    /**
  -     * Adds a type library import to the project.
  -     * @param typeLib the type library
  -     */
  -    public final void addTypeLib( final TypeLib typeLib )
  -    {
  -        m_imports.add( typeLib );
       }
   
       /**
  
  
  
  1.49      +4 -47     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.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- DefaultProjectBuilder.java	2 May 2002 10:52:19 -0000	1.48
  +++ DefaultProjectBuilder.java	12 May 2002 11:18:39 -0000	1.49
  @@ -22,20 +22,19 @@
   import org.apache.avalon.framework.configuration.SAXConfigurationHandler;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.myrmidon.api.metadata.ModelElement;
  +import org.apache.myrmidon.components.property.DefaultNameValidator;
   import org.apache.myrmidon.interfaces.builder.ProjectBuilder;
   import org.apache.myrmidon.interfaces.builder.ProjectException;
  -import org.apache.myrmidon.components.property.DefaultNameValidator;
   import org.apache.myrmidon.interfaces.oldmodel.Dependency;
   import org.apache.myrmidon.interfaces.oldmodel.Project;
   import org.apache.myrmidon.interfaces.oldmodel.Target;
  -import org.apache.myrmidon.interfaces.oldmodel.TypeLib;
   import org.xml.sax.XMLReader;
   
   /**
    * Default implementation to construct project from a build file.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.48 $ $Date: 2002/05/02 10:52:19 $
  + * @version $Revision: 1.49 $ $Date: 2002/05/12 11:18:39 $
    *
    * @ant.type type="project-builder" name="ant2"
    */
  @@ -49,9 +48,8 @@
       private static final Version VERSION = new Version( 2, 0, 0 );
   
       private static final int PROJECT_REFERENCES = 0;
  -    private static final int LIBRARY_IMPORTS = 1;
  -    private static final int IMPLICIT_TASKS = 2;
  -    private static final int TARGETS = 3;
  +    private static final int IMPLICIT_TASKS = 1;
  +    private static final int TARGETS = 2;
   
       // Use a name validator with the default rules.
       private DefaultNameValidator m_nameValidator = new DefaultNameValidator();
  @@ -301,19 +299,6 @@
                   }
                   else
                   {
  -                    state = LIBRARY_IMPORTS;
  -                }
  -            }
  -
  -            if( LIBRARY_IMPORTS == state )
  -            {
  -                if( name.equals( "import" ) )
  -                {
  -                    buildTypeLib( project, element );
  -                    continue;
  -                }
  -                else
  -                {
                       state = IMPLICIT_TASKS;
                   }
               }
  @@ -458,34 +443,6 @@
               final String message = REZ.getString( "ant.project-unexpected.error" );
               throw new ProjectException( message, e );
           }
  -    }
  -
  -    private void buildTypeLib( final DefaultProject project,
  -                               final Configuration element )
  -        throws ProjectException
  -    {
  -        final String library = element.getAttribute( "library", null );
  -        final String name = element.getAttribute( "name", null );
  -        final String type = element.getAttribute( "type", null );
  -
  -        if( null == library )
  -        {
  -            final String message =
  -                REZ.getString( "ant.import-no-library.error", element.getLocation() );
  -            throw new ProjectException( message );
  -        }
  -
  -        if( null == name || null == type )
  -        {
  -            if( null != name || null != type )
  -            {
  -                final String message =
  -                    REZ.getString( "ant.import-malformed.error", element.getLocation() );
  -                throw new ProjectException( message );
  -            }
  -        }
  -
  -        project.addTypeLib( new TypeLib( library, type, name ) );
       }
   
       /**
  
  
  
  1.9       +0 -2      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/Resources.properties,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Resources.properties	18 Mar 2002 02:33:43 -0000	1.8
  +++ Resources.properties	12 May 2002 11:18:39 -0000	1.9
  @@ -20,8 +20,6 @@
   ant.projectref-no-name.error=Malformed projectref without a name attribute at {0}.
   ant.projectref-bad-name.error=Projectref with an invalid name attribute at {0}.
   ant.projectref-no-location.error=Malformed projectref without a location attribute at {0}.
  -ant.import-no-library.error=Malformed import without a library attribute at {0}.
  -ant.import-malformed.error=Malformed import at {0}. If name or type attribute is specified, both attributes must be specified.
   ant.target-noname.error=Discovered un-named target at {0}.
   ant.target-bad-name.error=Target with an invalid name at {0}.
   ant.target-bad-dependency.error=Discovered empty dependency in target {0} at {1}.
  
  
  
  1.59      +1 -37     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java
  
  Index: DefaultWorkspace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- DefaultWorkspace.java	11 May 2002 12:44:00 -0000	1.58
  +++ DefaultWorkspace.java	12 May 2002 11:18:39 -0000	1.59
  @@ -24,7 +24,6 @@
   import org.apache.myrmidon.interfaces.oldmodel.Dependency;
   import org.apache.myrmidon.interfaces.oldmodel.Project;
   import org.apache.myrmidon.interfaces.oldmodel.Target;
  -import org.apache.myrmidon.interfaces.oldmodel.TypeLib;
   import org.apache.myrmidon.interfaces.type.TypeManager;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
   
  @@ -32,7 +31,7 @@
    * This is the default implementation of Workspace.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.58 $ $Date: 2002/05/11 12:44:00 $
  + * @version $Revision: 1.59 $ $Date: 2002/05/12 11:18:39 $
    */
   public class DefaultWorkspace
       extends AbstractLogEnabled
  @@ -156,7 +155,6 @@
               {
                   final ExecutionFrame frame = createExecutionFrame( project );
                   entry = new ProjectEntry( project, frame );
  -                executeTypeLibs( entry );
                   m_entries.put( project, entry );
               }
               catch( Exception e )
  @@ -274,40 +272,6 @@
   
           // Mark target as complete
           entry.setTargetState( target, TargetState.FINISHED );
  -    }
  -
  -    /**
  -     * Processes a typelib declaration.
  -     *
  -     * @param entry the project to execute the target in.
  -     */
  -    private void executeTypeLibs( final ProjectEntry entry )
  -        throws TaskException
  -    {
  -        final TypeLib[] typeLibs = entry.getProject().getTypeLibs();
  -        for( int i = 0; i < typeLibs.length; i++ )
  -        {
  -            final TypeLib typeLib = typeLibs[ i ];
  -            executeTypeLib( entry, typeLib );
  -        }
  -    }
  -
  -    /**
  -     * Processes a typelib declaration.
  -     *
  -     * @param entry the project to execute the target in.
  -     */
  -    private void executeTypeLib( final ProjectEntry entry,
  -                                 final TypeLib typeLib )
  -        throws TaskException
  -    {
  -        final ModelElement typelibModel =
  -            new ModelElement( "typelib", "myFile:?:?" );
  -        typelibModel.setAttribute( "library", typeLib.getLibrary() );
  -        typelibModel.setAttribute( "name", typeLib.getName() );
  -        typelibModel.setAttribute( "role", typeLib.getRole() );
  -
  -        m_executor.execute( typelibModel, entry.getFrame() );
       }
   
       /**
  
  
  
  1.3       +1 -8      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/oldmodel/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/oldmodel/Project.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Project.java	5 May 2002 12:08:23 -0000	1.2
  +++ Project.java	12 May 2002 11:18:39 -0000	1.3
  @@ -14,7 +14,7 @@
    * Implementations may choose to structure it anyway they choose.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.2 $ $Date: 2002/05/05 12:08:23 $
  + * @version $Revision: 1.3 $ $Date: 2002/05/12 11:18:39 $
    */
   public interface Project
   {
  @@ -31,13 +31,6 @@
        * Can be useful as project files embed own name (or should that be description).
        */
       String getProjectName();
  -
  -    /**
  -     * Get the imports for project.
  -     *
  -     * @return the imports
  -     */
  -    TypeLib[] getTypeLibs();
   
       /**
        * Get names of projects referenced by this project.
  
  
  
  1.5       +1 -4      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/builder/test/DefaultProjectBuilderTestCase.java
  
  Index: DefaultProjectBuilderTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/builder/test/DefaultProjectBuilderTestCase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultProjectBuilderTestCase.java	6 May 2002 09:29:44 -0000	1.4
  +++ DefaultProjectBuilderTestCase.java	12 May 2002 11:18:39 -0000	1.5
  @@ -21,7 +21,7 @@
    * Test cases for {@link org.apache.myrmidon.components.builder.DefaultProjectBuilder}.
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.4 $ $Date: 2002/05/06 09:29:44 $
  + * @version $Revision: 1.5 $ $Date: 2002/05/12 11:18:39 $
    */
   public class DefaultProjectBuilderTestCase
       extends AbstractContainerTestCase
  @@ -253,9 +253,6 @@
   
           // TODO - make sure each of the targets are the same
           assertTrue( Arrays.equals( expected.getTargetNames(), project.getTargetNames() ) );
  -
  -        // TODO - implement TypeLib.equals(), or use a comparator
  -        assertTrue( Arrays.equals( expected.getTypeLibs(), project.getTypeLibs() ) );
       }
   
       /**
  
  
  
  1.10      +1 -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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DefaultEmbeddorTest.java	11 May 2002 12:44:01 -0000	1.9
  +++ DefaultEmbeddorTest.java	12 May 2002 11:18:39 -0000	1.10
  @@ -24,7 +24,7 @@
    * Test cases for the default embeddor.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.9 $ $Date: 2002/05/11 12:44:01 $
  + * @version $Revision: 1.10 $ $Date: 2002/05/12 11:18:39 $
    */
   public class DefaultEmbeddorTest
       extends AbstractContainerTestCase
  @@ -87,7 +87,6 @@
           assertEquals( "main-target", project.getDefaultTargetName() );
           assertEquals( projectFile.getParentFile(), project.getBaseDirectory() );
           assertEquals( 0, project.getProjectNames().length );
  -        assertEquals( 0, project.getTypeLibs().length );
           assertEquals( 1, project.getTargetNames().length );
   
           final Target implicitTarget = project.getImplicitTarget();
  
  
  
  1.4       +1 -1      jakarta-ant-myrmidon/myrmidon/src/samples/namespace-test.ant
  
  Index: namespace-test.ant
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/myrmidon/src/samples/namespace-test.ant,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- namespace-test.ant	12 May 2002 04:03:32 -0000	1.3
  +++ namespace-test.ant	12 May 2002 11:18:39 -0000	1.4
  @@ -27,7 +27,7 @@
   
       <target name="log-import-selftest.atl">
           <!-- Import selftest.atl with the "test" namespace. -->
  -        <typelib library="selftest" namespace="test"/>
  +        <import library="selftest" namespace="test"/>
   
           <!-- The version of <log> in selftest.atl overrides the core Log task -->
           <log message="message"/> <!-- selftest.LogTask2 -->
  
  
  
  1.3       +0 -50     jakarta-ant-myrmidon/site/src/xdocs/buildfile.xml
  
  Index: buildfile.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/site/src/xdocs/buildfile.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- buildfile.xml	26 Apr 2002 03:22:24 -0000	1.2
  +++ buildfile.xml	12 May 2002 11:18:39 -0000	1.3
  @@ -55,7 +55,6 @@
   
   <ul>
   <li><a href="#project-refs">Project references</a></li>
  -<li><a href="#antlib-imports">Library imports</a></li>
   <li><a href="#init-tasks">Initialization tasks</a></li>
   <li><a href="#targets">Targets</a></li>
   </ul>
  @@ -94,55 +93,6 @@
       <target name="main" depends="subproject->compile">
           .. do some stuff ..
       </target>
  -</project>
  -]]></source>
  -
  -</subsection>
  -
  -<subsection name="Library Imports" anchor="antlib-imports">
  -
  -<p>Library imports allow the project to import tasks and types from an antlib.
  -An <code>&lt;import&gt;</code> element takes the following attributes:</p>
  -
  -<table>
  -    <tr><th>Attribute</th><th>Description</th><th>Default Value</th></tr>
  -    <tr>
  -        <td>library</td>
  -        <td>The name of the library to import.  The <code>ext</code> directory
  -        of the Myrmidon distribution is searched for a library file with
  -        the given name, and an <code>atl</code> extension.</td>
  -        <td>Required</td>
  -    </tr>
  -    <tr>
  -        <td>type</td>
  -        <td>The type of definition to import.  Values include <code>task</code>,
  -        and <code>data-type</code>.</td>
  -        <td>None</td>
  -    </tr>
  -    <tr>
  -        <td>name</td>
  -        <td>The name of the type to import.</td>
  -        <td>None</td>
  -    </tr>
  -</table>
  -
  -<p>
  -If the <code>type</code> and <code>name</code> attributes are not provided,
  -the entire contents of the antlib are imported.
  -</p>
  -
  -<p>The following example import the <code>&lt;my-task&gt;</code> task from
  -the <code>my-tasks</code> antlib.</p>
  -
  -<source><![CDATA[
  -
  -<project version="2.0">
  -  <!-- Import task <my-task> from the 'my-tasks' antlib. -->
  -  <import library="my-tasks" type="task" name="my-task"/>
  -
  -  <target name="main">
  -     <my-task some-prop=".."/>
  -  </target>
   </project>
   ]]></source>
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>