avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/repository/spi/src/test/org/apache/avalon/repository JarBuildDescriptorTest.java RepositoryLoaderTest.java
Date Fri, 07 Nov 2003 12:50:55 GMT
mcconnell    2003/11/07 04:50:55

  Modified:    repository/impl maven.xml project.xml
               repository/impl/src/java/org/apache/avalon/repository/impl
                        DefaultFactory.java DefaultRepositoryConfig.java
               repository/spi project.xml
               repository/spi/src/java/org/apache/avalon/repository
                        InitialRepositoryFactory.java
               repository/spi/src/test/org/apache/avalon/repository
                        JarBuildDescriptorTest.java
                        RepositoryLoaderTest.java
  Added:       repository/api .cvsignore project.xml
               repository/api/src/java/org/apache/avalon/repository
                        ArtifactDescriptor.java BlockManifest.java
                        JarBuildDescriptor.java JarDescriptor.java
                        ProxyContext.java Repository.java
                        RepositoryContext.java RepositoryException.java
                        RepositoryFactory.java package.html
  Removed:     repository/spi/src/java/org/apache/avalon/repository
                        ArtifactDescriptor.java BlockManifest.java
                        JarBuildDescriptor.java JarDescriptor.java
                        ProxyContext.java Repository.java
                        RepositoryConfig.java RepositoryException.java
                        RepositoryFactory.java
  Log:
  Seperate API from SPI.
  
  Revision  Changes    Path
  1.1                  avalon-sandbox/repository/api/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  maven.log
  velocity.log
  build.properties
  target
  .classpath
  .project
  
  
  1.1                  avalon-sandbox/repository/api/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  
  <project>
  
    <extend>${basedir}/../project.xml</extend>
  
    <groupId>avalon-repository</groupId>
    <id>avalon-repository-api</id>
    <name>Avalon Repository API</name>
    <currentVersion>1.1-dev</currentVersion>
  
    <package>org.apache.avalon.repository</package>
  
    <inceptionYear>2002</inceptionYear>
    <shortDescription>Avalon Repository API</shortDescription>
    
    <build>
  
      <sourceDirectory>${basedir}/src/java/</sourceDirectory>
      <unitTestSourceDirectory>${basedir}/src/test/</unitTestSourceDirectory>
  
      <unitTest>
        <includes>
          <include>**/*Test.*</include>
          <include>**/*TestCase.*</include>
        </includes>
        <excludes>
          <exclude>**/Abstract*.*</exclude>
        </excludes>
        <resources>
          <resource>
            <directory>${basedir}/src/test</directory>
            <includes>
              <include>**/*.x*</include>
            </includes>
          </resource>
        </resources>
      </unitTest>
  
      <resources>
        <resource>
          <directory>${basedir}/src/java</directory>
          <includes> 
            <include>**/*.properties</include>
          </includes>
        </resource>
      </resources>
  
      <jars></jars>
  
    </build>
  </project>
  
  
  
  1.1                  avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/ArtifactDescriptor.java
  
  Index: ArtifactDescriptor.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.repository ;
  
  
  import java.io.Serializable ;
  import java.text.ParseException ;
  
  
  /**
   * A bean which uniquely describes a repository artifact.
   *  
   * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
   * @author $Author: mcconnell $
   * @version $Revision: 1.1 $
   */
  public class ArtifactDescriptor implements Serializable
  {
      /** the name of the artifact */
      private String m_name = null ;
      /** the type of the artifact */
      private String m_type = null ;
      /** the group of the artifact */
      private String m_group = null ;
      /** the version of the artifact */
      private String m_version = null ;
      
      /** the artifact's string specification holding all artifact parameters */
      private transient String m_spec = null ;
      
      /** a dirty flag to track changes for rebuild of spec string */
      private transient boolean m_isDirty = true ;
  
      
      // ------------------------------------------------------------------------
      // Constructors
      // ------------------------------------------------------------------------
      
      
      /**
       * Creates a descriptor by breaking apart a Merlin artifact specification 
       * String into its various components.  The type of the descriptor is 
       * automatically presumed to be of the jar type.  Merlin represents a jar 
       * artifact using the following syntax: [group]:[artifact];[version].
       * 
       * @param a_spec the specification string
       */
      public ArtifactDescriptor( String a_spec )
          throws ParseException
      {
          if ( null == a_spec )
          {
              throw new NullPointerException( "a_spec arg must not be null" ) ;
          }
          
          m_spec = a_spec ;
          m_type = "jar" ;
          
          int l_colon = a_spec.indexOf( ':' ) ;
          if ( -1 == l_colon )
          {
              throw new ParseException( "Malformed Merlin artifact specification:"
                      + " no colon in specification.", 0 ) ;
          }
          
          int l_semiColon = a_spec.indexOf( ';' ) ;
          if ( -1 == l_semiColon )
          {
              throw new ParseException( "Malformed Merlin artifact specification:"
                      + " no semi-colon in specification.", 0 ) ;
          }
          
          if ( l_colon >= l_semiColon )
          {
              throw new ParseException( "Malformed Merlin artifact specification:"
                      + " colon index greater than semicolon index", 0 ) ;
          }
          
          m_group = a_spec.substring( 0, l_colon ) ;
          m_name = a_spec.substring( l_colon+1, l_semiColon ) ;
          m_version = a_spec.substring( l_semiColon+1 ) ;
      }
      
      
      /**
       * Creates an artifact descriptor using the components of a specification.
       * 
       * @param a_group the group of the artifact
       * @param a_name the name of the artifact
       * @param a_type the type of the artifact
       * @param a_version the version of the artifact
       */
      public ArtifactDescriptor( String a_group, String a_name, String a_type, 
                                 String a_version )
      {
          if ( null == a_group )
          {
              throw new NullPointerException( "a_group must not be null" ) ;
          }
          
          if ( null == a_name )
          {
              throw new NullPointerException( "a_name must not be null" ) ;
          }
  
          if ( null == a_type )
          {
              throw new NullPointerException( "a_type must not be null" ) ;
          }
          
          if ( null == a_version )
          {
              throw new NullPointerException( "a_version must not be null" ) ;
          }
          
          m_name = a_name ;
          m_type = a_type ; 
          m_group = a_group ;
          m_version = a_version ;
      }
      
      
      // ------------------------------------------------------------------------
      // bean accessors & mutators
      // ------------------------------------------------------------------------
  
      
      /**
       * @return Returns the group.
       */
      public String getGroup()
      {
          return m_group ;
      }
  
      
      /**
       * @param a_group The group to set.
       */
      public void setGroup( String a_group )
      {
          m_isDirty = true ;
          m_group = a_group ;
      }
  
      
      /**
       * @return Returns the name.
       */
      public String getName()
      {
          return m_name ;
      }
  
      
      /**
       * @param a_name The name to set.
       */
      public void setName( String a_name )
      {
          m_isDirty = true ;
          m_name = a_name ;
      }
  
      
      /**
       * @return Returns the type.
       */
      public String getType()
      {
          return m_type ;
      }
  
      
      /**
       * @param a_type The type to set.
       */
      public void setType( String a_type )
      {
          m_isDirty = true ;
          m_type = a_type ;
      }
  
      
      /**
       * @return Returns the version.
       */
      public String getVersion()
      {
          return m_version ;
      }
  
      
      /**
       * @param a_version The version to set.
       */
      public void setVersion( String a_version )
      {
          m_isDirty = true ;
          m_version = a_version ;
      }
  
  
      // ------------------------------------------------------------------------
      // Convenient Functionality Offered by Descriptor
      // ------------------------------------------------------------------------
      
      
      /**
       * Gets the artifact specification for this ArtifactDescriptor.
       * 
       * @return the artifact specification
       */
      public String getSpecification()
      {
          if ( null == m_spec || m_isDirty ) 
          {
              m_spec = createSpecification( m_group, m_name, m_version ) ;
              m_isDirty = false ;
          }
          
          return m_spec ;
      }
      
      
      /**
       * Returns the artifact specification String.
       * 
       * @see java.lang.Object#toString()
       */
      public String toString()
      {
          return getSpecification() ;
      }
      
      
      /**
       * Gets the relative path to an artifact without a URL base.  The returned
       * URL path component represents the path to the artifact within a local or 
       * remote repository.
       */
      public String getRelativePath( char a_separator )
      {
          StringBuffer l_buf = new StringBuffer() ;
          
          l_buf.append( m_group ) ;
          l_buf.append( a_separator ) ;
          l_buf.append( "jars" ) ;
          l_buf.append( a_separator ) ;
          l_buf.append( m_name ) ;
          l_buf.append( '-' ) ;
          l_buf.append( m_version ) ;
          l_buf.append( ".jar" ) ;
          
          return l_buf.toString() ;
      }
  
  
      /**
       * Gets the URL to the artifact given a base URL for the repository.
       * 
       * @param a_repository the base URL to the repository
       * @return the full URL to the artifact
       */
      public String getUrl( String a_repository )
      {
          StringBuffer l_buf = new StringBuffer( a_repository ) ;
          String l_relative = getRelativePath( '/' ) ;
          
          if ( '/' == l_buf.charAt( l_buf.length() - 1 ) )
          {
              l_buf.append( getRelativePath( '/' ) ) ;
          }
          else 
          {
              l_buf.append( '/' ) ;
              l_buf.append( getRelativePath( '/' ) ) ;
          }
          
          return l_buf.toString() ;
      }
  
      
      // ------------------------------------------------------------------------
      // Utility Functions
      // ------------------------------------------------------------------------
      
      
      /**
       * Creates the specification for an artifact given the components of it's
       * specification parameters.
       * 
       * @param a_group the group of the artifact
       * @param a_name the name of the artifact
       * @param a_version the version of the artifact
       * 
       * @return the composed specification String
       */
      public static String createSpecification( String a_group, String a_name,
  											  String a_version )
      {
          StringBuffer l_buf = new StringBuffer() ;
          l_buf.append( a_group ) ;
          l_buf.append( ':' ) ;
          l_buf.append( a_name ) ;
          l_buf.append( ';' ) ;
          l_buf.append( a_version ) ;
          return l_buf.toString() ;
      }
  }
  
  
  
  
  1.1                  avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/BlockManifest.java
  
  Index: BlockManifest.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.repository;
  
  /**
   * A block manifest that provides a set of convinience operations
   * to access block related attributes.
   *
   * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
   * @version $Revision: 1.1 $ $Date: 2003/11/07 12:50:54 $
   */
  public interface BlockManifest
  {
  
     /**
      * Group identifier manifest key.
      */
      public static final String BLOCK_GROUP_KEY = "Block-Group";
  
     /**
      * Name identifier manifest key.
      */
      public static final String BLOCK_NAME_KEY = "Block-Name";
  
     /**
      * Version identifier manifest key.
      */
      public static final String BLOCK_VERSION_KEY = "Block-Version";
  
     /**
      * Get the name of the group that the block is a part of.
      * @return the block group
      */
      String getBlockGroup();
  
     /**
      * Get the name the block.
      * @return the block name
      */
      String getBlockName();
  
     /**
      * Get the version of the block.
      * @return the block version
      */
      String getBlockVersion();
  }
  
  
  
  1.1                  avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/JarBuildDescriptor.java
  
  Index: JarBuildDescriptor.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.repository ;
  
  
  import java.util.Properties ;
  
  
  /**
   * A build descriptor can be generated from a jar that has extra jar build 
   * properties packaged with it.
   * 
   * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
   * @author $Author: mcconnell $
   * @version $Revision: 1.1 $
   */
  public class JarBuildDescriptor
  {
      /** name of the file with the jar's build description */
      public static final String JAR_PROPS = "jar.properties" ;
      /** the key used to get the defualt repository url */
      public static final String REPO_KEY = "build.repo" ;
      /** the key used to get the artifact group */
      public static final String GROUP_KEY = "build.group" ;
      /** the key used to get the artifact name or id within the group */
      public static final String NAME_KEY = "build.name" ;
      /** the version of the build artifact */
      public static final String VERSION_KEY = "build.version" ;
      
      /** the jar artifact descriptor */
      private final JarDescriptor m_jarDescriptor ;
      /** default repo that will contain this jar and project descriptors */
      private final String m_repo ;
  
      
      /**
       * Creates a JarBuildDescriptor for a specific jar file.
       * 
       * @param a_descriptor the jar artifact descriptor
       * @param a_props extra jar build properties
       */
      private JarBuildDescriptor( JarDescriptor a_jarDescriptor, 
                                  Properties a_props )
      {
          m_jarDescriptor = a_jarDescriptor ;
          m_repo = a_props.getProperty( REPO_KEY ) ;
      }
      
      
      /**
       * Loads artifact properties from the jar and builds a JarBuildDescriptor
       * using those fundimental jar properties.
       * 
       * @param a_loader the ClassLoader to use for loading jar properties
       * @return a descriptor for the build of the jar artifact 
       */
      public static JarBuildDescriptor 
          getJarBuildDescriptor( ClassLoader a_loader ) throws RepositoryException
      {
          Properties l_props = new Properties() ;
          
          if ( null == a_loader )
          {
              throw new NullPointerException( "ClassLoader must not be null." ) ; 
          }
  
          try
          {
              l_props.load( a_loader.getResourceAsStream( JAR_PROPS ) ) ;
          }
          catch( Throwable t )
          {
              throw new RepositoryException( "Could not load " + JAR_PROPS, t ) ;
          }
          
          JarDescriptor l_jarDescriptor = new JarDescriptor(
                  l_props.getProperty( GROUP_KEY ),
                  l_props.getProperty( NAME_KEY ),
                  l_props.getProperty( VERSION_KEY ) ) ;
          return new JarBuildDescriptor( l_jarDescriptor, l_props ) ;
      }
      
      
      /**
       * Gets the artifact descriptor for the jar.
       * 
       * @return the artifact descriptor for the jar
       */
      public JarDescriptor getJarDescriptor()
      {
          return m_jarDescriptor ;
      }
  
      
      /**
       * Gets the default or bootstrap repository guaranteed to contain the jar.
       * 
       * @return the repo url as a string
       */
      public String getDefaultRepository()
      {
          return m_repo ;
      }
  }
  
  
  
  1.1                  avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/JarDescriptor.java
  
  Index: JarDescriptor.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.repository ;
  
  
  import java.text.ParseException ;
  
  
  /**
   * A special case of the ArtifactDescriptor that defaults to a jar.
   * 
   * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
   * @author $Author: mcconnell $
   * @version $Revision: 1.1 $
   */
  public class JarDescriptor extends ArtifactDescriptor
  {
      /**
       * 
       * @param a_spec
       * @throws ParseException
       */
      public JarDescriptor( String a_spec ) throws ParseException
      {
          super( a_spec ) ; 
      }
  
      
      /**
       * 
       * @param a_group
       * @param a_name
       * @param a_version
       */
      public JarDescriptor( String a_group, String a_name, String a_version )
      {
          super( a_group, a_name, "jar", a_version ) ;
      }
  }
  
  
  
  1.1                  avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/ProxyContext.java
  
  Index: ProxyContext.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.repository;
  
  import java.net.Authenticator;
  
  /**
   * A proxy context.
   *
   * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
   * @version $Revision: 1.1 $ $Date: 2003/11/07 12:50:54 $
   */
  public final class ProxyContext
  {
      /**
       * Host.
       */
       private String m_host;
  
      /**
       * Port.
       */
       private int m_port;
  
      /**
       * Authenticator.
       */
       private Authenticator m_authenticator;
  
      /**
       * Creation of a new proxy context.
       * @param host the host name
       * @param port the port
       * @param authenticator the authenticator
       */
       public ProxyContext( String host, int port, Authenticator authenticator )
       {
           if( host == null ) throw new NullPointerException( "host" );
  
           m_host = host;
           m_port = port;
           m_authenticator = authenticator;
       }
  
      /**
       * Returns the proxy authenticator.
       * @return the authenticator
       */
       public Authenticator getAuthenticator()
       {
            return m_authenticator;
       }
  
      /**
       * Returns the proxy host name.
       * @return the host name
       */
       public String getHost()
       {
            return m_host;
       }
  
      /**
       * Returns the proxy port number.
       * @return the port
       */
       public String getPort()
       {
            return "" + m_port;
       }
  }
  
  
  
  1.1                  avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/Repository.java
  
  Index: Repository.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.repository;
  
  import java.net.URL;
  
  /**
   * A service that provides access to versioned resources.
   * @author <a href="mailto:mcconnell@osm.net">Stephen McConnell</a>
   * @version $Revision: 1.1 $ $Date: 2003/11/07 12:50:54 $
   */
  public interface Repository
  {
     /**
      * The context resolution key.
      */
      static final String KEY = "urn:assembly:repository";
  
     /**
      * The seperator character between the group and resource name values
      * in an artifact name.
      */
      static final String SEPERATOR = ":";
  
     /**
      * Install a block archive into the repository.
      * @param url the block archive url
      * @return the block manifest
      */
      BlockManifest install( URL url, StringBuffer buffer ) throws RepositoryException;
  
     /**
      * Get a resource relative to the supplied artifact name where the artifact name
      * is equivalent to the group and resource name seperated by the colon character.
      * 
      * @param artifact the artifact name
      * @param version the version identifier
      * @param type the resource type
      * @return the resource
      */
      public URL getArtifact( 
        final String artifact, final String version, final String type )
        throws RepositoryException;
  
     /**
      * Get a resource url relative to the supplied application name, 
      * resource name, version and resource type.
      * 
      * @param group the application or group name
      * @param name the resource name
      * @param version the version identifier
      * @param type the resource type
      * @return the resource url
      */
      URL getArtifact( 
        final String group, final String name, final String version, final String type )
        throws RepositoryException;
  
     /**
      * Return the repository location.
      * 
      * @return the location
      */
      String getLocation();
  
  }
  
  
  
  1.1                  avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/RepositoryContext.java
  
  Index: RepositoryContext.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.repository ;
  
  
  import java.net.URL ;
  import java.net.MalformedURLException ;
  
  
  /**
   * Repository configuration bean interface.
   *  
   * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
   * @author $Author: mcconnell $
   * @version $Revision: 1.1 $
   */
  public interface RepositoryContext
  {
      /**
       * Gets the ProxyContext used by the Kernel to access remote repositories.
       * 
       * @return the proxy context used by the Kernel
       */
      ProxyContext getProxyContext() ;
      
      /**
       * Sets the ProxyContext for this KernelConfig.
       * 
       * @param a_proxyCtx sets the proxy context
       */
      void setProxyContext( ProxyContext a_proxyCtx ) ;
      
      /**
       * Gets the set of remote repositories used to download artifacts.
       * 
       * @return the remote repositories to use
       */
      URL[] getRemoteRepositories() ;
      
      /**
       * Gets the remote repository urls for downloading artifacts.
       * 
       * @param a_remoteRepositories the remote Repositories to use.
       */
      void setRemoteRepositoryUrls( URL[] a_remoteRepositories ) ;
  
      /**
       * Sets the remote repository urls for downloading artifacts.
       * 
       * @param a_urls the remote Repositories to use.
       */
      void setRemoteRepositoryUrls( String[] a_urls ) 
          throws MalformedURLException ;
  
      /**
       * Gets the directory where repository artifacts are stored after being 
       * downloaded from the Repository.
       * 
       * @return the place to cache repository artifacts
       */
      public abstract String getCacheDir() ;
  
      /**
       * Sets the directory where we store downloaded artifacts.
       * 
       * @param a_cacheDir the place to cache repository artifacts
       */
      void setCacheDir( String a_cacheDir ) ;
  }
  
  
  
  1.1                  avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/RepositoryException.java
  
  Index: RepositoryException.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.repository;
  
  /**
   * Exception to indicate that there was a repository related error.
   *
   * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
   * @version $Revision: 1.1 $ $Date: 2003/11/07 12:50:54 $
   */
  public class RepositoryException extends Exception
  {
      private Throwable m_cause;
  
      /**
       * Construct a new <code>RepositoryException</code> instance.
       *
       * @param message The detail message for this exception.
       */
      public RepositoryException( final String message )
      {
          this( message, null );
      }
  
      /**
       * Construct a new <code>RepositoryException</code> instance.
       *
       * @param message The detail message for this exception.
       * @param cause the root cause of the exception
       */
      public RepositoryException( final String message, final Throwable cause )
      {
          super( message );
          m_cause = cause;
      }
  
     /**
      * Return the causal exception.
      * @return the causal exception (possibly null)
      */
      public Throwable getCause()
      {
          return m_cause;
      }
  }
  
  
  
  
  1.1                  avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/RepositoryFactory.java
  
  Index: RepositoryFactory.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
      "Apache Software Foundation"  must not be used to endorse or promote
      products derived  from this  software without  prior written
      permission. For written permission, please contact apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  package org.apache.avalon.repository ;
  
  
  /**
   * Interface for Repository factories.
   * 
   * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
   * @author $Author: mcconnell $
   * @version $Revision: 1.1 $
   */
  public interface RepositoryFactory
  {
      /**
       * Creates a new default context populated with default values.
       *  
       * @return a default context used for Repository creation
       * @throws RepositoryException if there is a problem generating defaults
       */
      RepositoryContext getDefaultContext() throws RepositoryException ;
  
      /**
       * Creates a new Repository using a configuration bean. 
       * 
       * @param context the Repository creation context
       * @return the newly created Repository
       * @throws RepositoryException if there is a problem creating the Repository
       */
      Repository create( RepositoryContext context ) throws RepositoryException ;
  }
  
  
  
  1.1                  avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/package.html
  
  Index: package.html
  ===================================================================
  
  <body>
  <p>
  The repository package contains an contract for abstract repository services.
  </p>
  
  </body>
  
  
  
  1.2       +36 -34    avalon-sandbox/repository/impl/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/repository/impl/maven.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- maven.xml	6 Nov 2003 04:05:04 -0000	1.1
  +++ maven.xml	7 Nov 2003 12:50:54 -0000	1.2
  @@ -1,34 +1,36 @@
  -<project default="merlin:build" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util" xmlns:ant="jelly:ant">
  -
  -  <!--
  -  Write a implementation catalog relative to the spi version.
  -  -->
  -
  -  <preGoal name="java:compile">
  -
  -    <j:set var="spi" value="${pom.getDependency('avalon-repository:avalon-repository-spi')}"/>
  -    <j:set var="filename" value="${maven.build.dir}/classes/${pom.groupId}-${spi.version}.properties"/>
  -    <ant:echo message="Catalog: ${filename}"/>
  -    <ant:echo file="${filename}">
  -#
  -# Catalog descriptor.
  -# 
  -
  -project = ${pom.groupId}
  -implementation = ${pom.groupId}:${pom.artifactId};${pom.currentVersion}
  -
  -#
  -# Implementation dependencies
  -#
  -</ant:echo>
  -    <j:set var="index" value="0"/>
  -    <j:forEach var="dep" items="${pom.dependencies}">
  -      <ant:echo file="${filename}" append="true">
  -artifact.${index} = ${dep.groupId}:${dep.artifactId};${dep.version}</ant:echo>
  -    <j:set var="index" value="${index+1}"/>
  -    </j:forEach>
  -    <ant:echo file="${filename}" append="true">
  -</ant:echo>
  -  </preGoal>
  -
  -</project>
  +<project default="merlin:build" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util" xmlns:ant="jelly:ant">
  +
  +  <!--
  +  Write a implementation catalog relative to the spi version.
  +  -->
  +
  +  <preGoal name="java:compile">
  +    <j:set var="spi" value="${pom.getDependency('avalon-repository:avalon-repository-spi')}"/>
  +    <j:set var="filename" value="${maven.build.dir}/classes/${pom.groupId}-${spi.version}.properties"/>
  +    <ant:echo message="Catalog: ${filename}"/>
  +    <ant:echo file="${filename}">
  +#
  +# Catalog descriptor.
  +# 
  +
  +project = ${pom.groupId}
  +implementation = ${pom.groupId}:${pom.artifactId};${pom.currentVersion}
  +
  +#
  +# Implementation dependencies
  +#
  +
  +</ant:echo>
  +    <j:set var="index" value="0"/>
  +    <j:forEach var="dep" items="${pom.dependencies}">
  +      <ant:echo file="${filename}" append="true">
  +artifact.${index} = ${dep.groupId}:${dep.artifactId};${dep.version}</ant:echo>
  +    <j:set var="index" value="${index+1}"/>
  +    </j:forEach>
  +    <ant:echo file="${filename}" append="true">
  +</ant:echo>
  +  </preGoal>
  +
  +</project>
  +
  +
  
  
  
  1.3       +34 -29    avalon-sandbox/repository/impl/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/repository/impl/project.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- project.xml	6 Nov 2003 04:15:15 -0000	1.2
  +++ project.xml	7 Nov 2003 12:50:54 -0000	1.3
  @@ -1,29 +1,34 @@
  -<?xml version="1.0" encoding="ISO-8859-1"?>
  -
  -<project>
  -
  -  <extend>${basedir}/../project.xml</extend>
  -
  -  <groupId>avalon-repository</groupId>
  -  <id>avalon-repository-impl</id>
  -  <name>Avalon Repository Implementation</name>
  -  <package>org.apache.avalon.repository</package>
  -  <currentVersion>1.1-dev</currentVersion>
  -
  -  <inceptionYear>2002</inceptionYear>
  -  <shortDescription>Jar file repository implementation.</shortDescription>
  -
  -  <dependencies>
  -    <dependency>
  -      <groupId>avalon-repository</groupId>
  -      <artifactId>avalon-repository-spi</artifactId>
  -      <version>1.1-dev</version>
  -    </dependency>
  -    <dependency>
  -      <groupId>avalon-util</groupId>
  -      <artifactId>avalon-util-defaults</artifactId>
  -      <version>1.0-dev</version>
  -    </dependency>
  -  </dependencies>
  -
  -</project>
  +<?xml version="1.0" encoding="ISO-8859-1"?>
  +
  +<project>
  +
  +  <extend>${basedir}/../project.xml</extend>
  +
  +  <groupId>avalon-repository</groupId>
  +  <id>avalon-repository-impl</id>
  +  <name>Avalon Repository Implementation</name>
  +  <package>org.apache.avalon.repository</package>
  +  <currentVersion>1.1-dev</currentVersion>
  +
  +  <inceptionYear>2002</inceptionYear>
  +  <shortDescription>Jar file repository implementation.</shortDescription>
  +
  +  <dependencies>
  +    <dependency>
  +      <groupId>avalon-repository</groupId>
  +      <artifactId>avalon-repository-api</artifactId>
  +      <version>1.1-dev</version>
  +    </dependency>
  +    <dependency>
  +      <groupId>avalon-repository</groupId>
  +      <artifactId>avalon-repository-spi</artifactId>
  +      <version>1.1-dev</version>
  +    </dependency>
  +    <dependency>
  +      <groupId>avalon-util</groupId>
  +      <artifactId>avalon-util-defaults</artifactId>
  +      <version>1.0-dev</version>
  +    </dependency>
  +  </dependencies>
  +
  +</project>
  
  
  
  1.3       +14 -14    avalon-sandbox/repository/impl/src/java/org/apache/avalon/repository/impl/DefaultFactory.java
  
  Index: DefaultFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/repository/impl/src/java/org/apache/avalon/repository/impl/DefaultFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultFactory.java	6 Nov 2003 05:28:34 -0000	1.2
  +++ DefaultFactory.java	7 Nov 2003 12:50:55 -0000	1.3
  @@ -68,7 +68,7 @@
   
   import org.apache.avalon.repository.Repository ;
   import org.apache.avalon.repository.ProxyContext ;
  -import org.apache.avalon.repository.RepositoryConfig ;
  +import org.apache.avalon.repository.RepositoryContext ;
   import org.apache.avalon.repository.RepositoryFactory ;
   import org.apache.avalon.repository.RepositoryException ;
   
  @@ -118,14 +118,14 @@
        * same properties file (dot '.' prefixed), and the system properties in 
        * that order.  Support property key macro expansion.
        * 
  -     * @see org.apache.avalon.repository.RepositoryFactory#getDefaultConfig()
  +     * @see org.apache.avalon.repository.RepositoryFactory#getDefaultContext()
        */
  -    public RepositoryConfig getDefaultConfig()
  +    public RepositoryContext getDefaultContext()
           throws RepositoryException
       {
           Properties l_bootstrap = new Properties() ;
           ProxyContext l_proxy = null ;
  -        RepositoryConfig l_config = new DefaultRepositoryConfig() ;
  +        RepositoryContext l_config = new DefaultRepositoryConfig() ;
           InputStream l_in = Repository.class.getResourceAsStream( DEFAULTS ) ;
           
           /*
  @@ -212,27 +212,27 @@
        * Creates a file repository using the properties of a configuration bean.
        * 
        * @see org.apache.avalon.repository.RepositoryFactory
  -     * create(org.apache.avalon.repository.RepositoryConfig)
  +     * create(org.apache.avalon.repository.RepositoryContext)
        */
  -    public Repository create( RepositoryConfig a_config )
  +    public Repository create( RepositoryContext context )
       {
           Repository l_repository = null ;
  -        File l_base = new File( a_config.getCacheDir() ) ;
  +        File l_base = new File( context.getCacheDir() ) ;
           
  -        if ( null == a_config.getProxyContext() && 
  -             null == a_config.getRemoteRepositories() )
  +        if ( null == context.getProxyContext() && 
  +             null == context.getRemoteRepositories() )
           {
               l_repository = new DefaultFileRepository( l_base ) ;
           }
  -        else if ( null == a_config.getProxyContext() )
  +        else if ( null == context.getProxyContext() )
           {
               l_repository = new DefaultFileRepository( l_base, 
  -                    a_config.getRemoteRepositories() ) ;
  +                    context.getRemoteRepositories() ) ;
           }
           
           l_repository = new DefaultFileRepository( l_base, 
  -                a_config.getProxyContext(), 
  -                a_config.getRemoteRepositories() ) ;
  +                context.getProxyContext(), 
  +                context.getRemoteRepositories() ) ;
           
           return l_repository ;
       }
  
  
  
  1.2       +2 -2      avalon-sandbox/repository/impl/src/java/org/apache/avalon/repository/impl/DefaultRepositoryConfig.java
  
  Index: DefaultRepositoryConfig.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/repository/impl/src/java/org/apache/avalon/repository/impl/DefaultRepositoryConfig.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultRepositoryConfig.java	6 Nov 2003 05:28:34 -0000	1.1
  +++ DefaultRepositoryConfig.java	7 Nov 2003 12:50:55 -0000	1.2
  @@ -55,7 +55,7 @@
   import java.net.MalformedURLException ;
   
   import org.apache.avalon.repository.ProxyContext ;
  -import org.apache.avalon.repository.RepositoryConfig ;
  +import org.apache.avalon.repository.RepositoryContext ;
   
   
   /**
  @@ -65,7 +65,7 @@
    * @author $Author$
    * @version $Revision$
    */
  -public class DefaultRepositoryConfig implements RepositoryConfig
  +public class DefaultRepositoryConfig implements RepositoryContext
   {
       /** the set of remote repositories to pull jars from */
       private URL [] m_remoteRepositories = null ; 
  
  
  
  1.3       +60 -52    avalon-sandbox/repository/spi/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/repository/spi/project.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- project.xml	6 Nov 2003 04:13:47 -0000	1.2
  +++ project.xml	7 Nov 2003 12:50:55 -0000	1.3
  @@ -1,52 +1,60 @@
  -<?xml version="1.0" encoding="ISO-8859-1"?>
  -
  -<project>
  -
  -  <extend>${basedir}/../project.xml</extend>
  -
  -  <groupId>avalon-repository</groupId>
  -  <id>avalon-repository-spi</id>
  -  <name>Avalon Repository SPI</name>
  -  <currentVersion>1.1-dev</currentVersion>
  -
  -  <package>org.apache.avalon.repository</package>
  -
  -  <inceptionYear>2002</inceptionYear>
  -  <shortDescription>Avalon Repository SPI</shortDescription>
  -  
  -  <build>
  -
  -    <sourceDirectory>${basedir}/src/java/</sourceDirectory>
  -    <unitTestSourceDirectory>${basedir}/src/test/</unitTestSourceDirectory>
  -
  -    <unitTest>
  -      <includes>
  -        <include>**/*Test.*</include>
  -        <include>**/*TestCase.*</include>
  -      </includes>
  -      <excludes>
  -        <exclude>**/Abstract*.*</exclude>
  -      </excludes>
  -      <resources>
  -        <resource>
  -          <directory>${basedir}/src/test</directory>
  -          <includes>
  -            <include>**/*.x*</include>
  -          </includes>
  -        </resource>
  -      </resources>
  -    </unitTest>
  -
  -    <resources>
  -      <resource>
  -        <directory>${basedir}/src/java</directory>
  -        <includes> 
  -          <include>**/*.properties</include>
  -        </includes>
  -      </resource>
  -    </resources>
  -
  -    <jars></jars>
  -
  -  </build>
  -</project>
  +<?xml version="1.0" encoding="ISO-8859-1"?>
  +
  +<project>
  +
  +  <extend>${basedir}/../project.xml</extend>
  +
  +  <groupId>avalon-repository</groupId>
  +  <id>avalon-repository-spi</id>
  +  <name>Avalon Repository SPI</name>
  +  <currentVersion>1.1-dev</currentVersion>
  +
  +  <package>org.apache.avalon.repository</package>
  +
  +  <inceptionYear>2002</inceptionYear>
  +  <shortDescription>Avalon Repository SPI</shortDescription>
  +  
  +  <dependencies>
  +    <dependency>
  +      <groupId>avalon-repository</groupId>
  +      <artifactId>avalon-repository-api</artifactId>
  +      <version>1.1-dev</version>
  +    </dependency>
  +  </dependencies>
  +
  +  <build>
  +
  +    <sourceDirectory>${basedir}/src/java/</sourceDirectory>
  +    <unitTestSourceDirectory>${basedir}/src/test/</unitTestSourceDirectory>
  +
  +    <unitTest>
  +      <includes>
  +        <include>**/*Test.*</include>
  +        <include>**/*TestCase.*</include>
  +      </includes>
  +      <excludes>
  +        <exclude>**/Abstract*.*</exclude>
  +      </excludes>
  +      <resources>
  +        <resource>
  +          <directory>${basedir}/src/test</directory>
  +          <includes>
  +            <include>**/*.x*</include>
  +          </includes>
  +        </resource>
  +      </resources>
  +    </unitTest>
  +
  +    <resources>
  +      <resource>
  +        <directory>${basedir}/src/java</directory>
  +        <includes> 
  +          <include>**/*.properties</include>
  +        </includes>
  +      </resource>
  +    </resources>
  +
  +    <jars></jars>
  +
  +  </build>
  +</project>
  
  
  
  1.5       +18 -23    avalon-sandbox/repository/spi/src/java/org/apache/avalon/repository/InitialRepositoryFactory.java
  
  Index: InitialRepositoryFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/repository/spi/src/java/org/apache/avalon/repository/InitialRepositoryFactory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InitialRepositoryFactory.java	6 Nov 2003 23:53:06 -0000	1.4
  +++ InitialRepositoryFactory.java	7 Nov 2003 12:50:55 -0000	1.5
  @@ -78,8 +78,6 @@
    */
   public class InitialRepositoryFactory implements RepositoryFactory
   {
  -    /** the artifact name of the default repostory factory implemenation jar */
  -    public static final String DEFAULT_IMPL = "repository-impl" ;
       /** base property key for the urls of the required jars */
       public static final String URLS_BASE = "url" ;
       /** factory delegate implementation class name key */
  @@ -105,21 +103,8 @@
        * 
        * @throws RepositoryException
        */
  -    public InitialRepositoryFactory( String a_implementation, String a_version )
  -        throws RepositoryException
  +    public InitialRepositoryFactory() throws RepositoryException
       {
  -        /*
  -         * Gets the implementation's dependency descriptor from the repository
  -         * and generate a set of properties for it. 
  -         */
  -        // Get the api jar's build descriptor - this class is in the jar
  -        JarBuildDescriptor l_myBuild = JarBuildDescriptor.getJarBuildDescriptor(
  -            InitialRepositoryFactory.class.getClassLoader() ) ;
  -        JarDescriptor l_myJar = l_myBuild.getJarDescriptor() ;
  -        ArtifactDescriptor l_implDesc = new ArtifactDescriptor( l_myBuild
  -            .getJarDescriptor().getGroup(), a_implementation, "properties", 
  -            a_version ) ;
  -        
           /* 
            * Create the temporary directory to pull down files into
            */
  @@ -130,6 +115,16 @@
               l_tmpDir.mkdirs() ;
           }
           
  +        JarBuildDescriptor l_myBuild = JarBuildDescriptor.getJarBuildDescriptor(
  +            InitialRepositoryFactory.class.getClassLoader() ) ;
  +        
  +        /*
  +         * Now we want to figure out what implementation we are going to use
  +         * and instantiate the appropriate factory for that implementation.
  +         * 
  +         * Use our descriptor to access the appropriate release catelog for the 
  +         * entire group.
  +         */
           
           
           /*
  @@ -233,16 +228,16 @@
       /**
        * Factory method that creates a repository by calling the delegate factory.
        * 
  -     * @param a_config a repository configuration bean
  +     * @param context a repository creation context
        * @return the newly created repository
        * @throws RepositoryException if there is a failure while creating the repo
        * @see org.apache.avalon.repository.RepositoryFactory
  -     * create(org.apache.avalon.repository.RepositoryConfig)
  +     * create(org.apache.avalon.repository.RepositoryContext)
        */
  -    public Repository create( RepositoryConfig a_config ) 
  +    public Repository create( RepositoryContext context ) 
           throws RepositoryException 
       {
  -        return m_delegate.create( a_config ) ;
  +        return m_delegate.create( context ) ;
       }
   
       
  @@ -250,11 +245,11 @@
        * Factory method that creates a default repository configuration bean 
        * by calling the delegate factory.
        * 
  -     * @see org.apache.avalon.repository.RepositoryFactory#getDefaultConfig()
  +     * @see org.apache.avalon.repository.RepositoryFactory#getDefaultContext()
        */
  -    public RepositoryConfig getDefaultConfig() throws RepositoryException
  +    public RepositoryContext getDefaultContext() throws RepositoryException
       {
  -        return m_delegate.getDefaultConfig() ;
  +        return m_delegate.getDefaultContext() ;
       }
       
       
  
  
  
  1.2       +113 -113  avalon-sandbox/repository/spi/src/test/org/apache/avalon/repository/JarBuildDescriptorTest.java
  
  Index: JarBuildDescriptorTest.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/repository/spi/src/test/org/apache/avalon/repository/JarBuildDescriptorTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JarBuildDescriptorTest.java	6 Nov 2003 04:09:15 -0000	1.1
  +++ JarBuildDescriptorTest.java	7 Nov 2003 12:50:55 -0000	1.2
  @@ -1,113 +1,113 @@
  -/*
  -
  - ============================================================================
  -                   The Apache Software License, Version 1.1
  - ============================================================================
  -
  - Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  -
  - Redistribution and use in source and binary forms, with or without modifica-
  - tion, are permitted provided that the following conditions are met:
  -
  - 1. Redistributions of  source code must  retain the above copyright  notice,
  -    this list of conditions and the following disclaimer.
  -
  - 2. Redistributions in binary form must reproduce the above copyright notice,
  -    this list of conditions and the following disclaimer in the documentation
  -    and/or other materials provided with the distribution.
  -
  - 3. The end-user documentation included with the redistribution, if any, must
  -    include  the following  acknowledgment:  "This product includes  software
  -    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
  -    Alternately, this  acknowledgment may  appear in the software itself,  if
  -    and wherever such third-party acknowledgments normally appear.
  -
  - 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
  -    "Apache Software Foundation"  must not be used to endorse or promote
  -    products derived  from this  software without  prior written
  -    permission. For written permission, please contact apache@apache.org.
  -
  - 5. Products  derived from this software may not  be called "Apache", nor may
  -    "Apache" appear  in their name,  without prior written permission  of the
  -    Apache Software Foundation.
  -
  - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  - FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
  - APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
  - INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
  - DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
  - OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
  - ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
  - (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
  - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  -
  - This software  consists of voluntary contributions made  by many individuals
  - on  behalf of the Apache Software  Foundation. For more  information on the
  - Apache Software Foundation, please see <http://www.apache.org/>.
  -
  -*/
  -
  -package org.apache.avalon.repository;
  -
  -import junit.framework.TestCase;
  -
  -
  -/**
  - * @todo
  - * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
  - * @author $Author$
  - * @version $Revision$
  - */
  -public class JarBuildDescriptorTest extends TestCase
  -{
  -
  -    public static void main(String[] args)
  -    {
  -        junit.textui.TestRunner.run(JarBuildDescriptorTest.class);
  -    }
  -
  -    /*
  -     * @see TestCase#setUp()
  -     */
  -    protected void setUp() throws Exception
  -    {
  -        super.setUp();
  -    }
  -
  -    /*
  -     * @see TestCase#tearDown()
  -     */
  -    protected void tearDown() throws Exception
  -    {
  -        super.tearDown();
  -    }
  -
  -    /**
  -     * Constructor for JarBuildDescriptorTest.
  -     * @param arg0
  -     */
  -    public JarBuildDescriptorTest(String arg0)
  -    {
  -        super(arg0);
  -    }
  -    
  -    
  -    public void testGetJarBuildDescriptor() throws Exception
  -    {
  -        ClassLoader l_loader = JarBuildDescriptor.class.getClassLoader() ;
  -        JarBuildDescriptor l_descriptor = JarBuildDescriptor
  -            .getJarBuildDescriptor( l_loader ) ;
  -        assertNotNull( l_descriptor ) ;
  -        
  -        JarDescriptor l_jarDescriptor = l_descriptor.getJarDescriptor() ;
  -        String l_url = l_descriptor.getDefaultRepository() ; 
  -        assertEquals( l_url, "http://www.ibiblio.org/maven" ) ;
  -        assertEquals( l_jarDescriptor.getGroup(),
  -                "avalon-repository" ) ;
  -        assertEquals( l_jarDescriptor.getName(),
  -                "avalon-repository-spi" ) ;
  -        assertEquals( l_jarDescriptor.getType(),
  -                "jar" ) ;
  -    }
  -}
  +/*
  +
  + ============================================================================
  +                   The Apache Software License, Version 1.1
  + ============================================================================
  +
  + Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  +
  + Redistribution and use in source and binary forms, with or without modifica-
  + tion, are permitted provided that the following conditions are met:
  +
  + 1. Redistributions of  source code must  retain the above copyright  notice,
  +    this list of conditions and the following disclaimer.
  +
  + 2. Redistributions in binary form must reproduce the above copyright notice,
  +    this list of conditions and the following disclaimer in the documentation
  +    and/or other materials provided with the distribution.
  +
  + 3. The end-user documentation included with the redistribution, if any, must
  +    include  the following  acknowledgment:  "This product includes  software
  +    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
  +    Alternately, this  acknowledgment may  appear in the software itself,  if
  +    and wherever such third-party acknowledgments normally appear.
  +
  + 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
  +    "Apache Software Foundation"  must not be used to endorse or promote
  +    products derived  from this  software without  prior written
  +    permission. For written permission, please contact apache@apache.org.
  +
  + 5. Products  derived from this software may not  be called "Apache", nor may
  +    "Apache" appear  in their name,  without prior written permission  of the
  +    Apache Software Foundation.
  +
  + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  + FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
  + APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
  + INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
  + DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
  + OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
  + ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
  + (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
  + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +
  + This software  consists of voluntary contributions made  by many individuals
  + on  behalf of the Apache Software  Foundation. For more  information on the
  + Apache Software Foundation, please see <http://www.apache.org/>.
  +
  +*/
  +
  +package org.apache.avalon.repository;
  +
  +import junit.framework.TestCase;
  +
  +
  +/**
  + * @todo
  + * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
  + * @author $Author$
  + * @version $Revision$
  + */
  +public class JarBuildDescriptorTest extends TestCase
  +{
  +
  +    public static void main(String[] args)
  +    {
  +        junit.textui.TestRunner.run(JarBuildDescriptorTest.class);
  +    }
  +
  +    /*
  +     * @see TestCase#setUp()
  +     */
  +    protected void setUp() throws Exception
  +    {
  +        super.setUp();
  +    }
  +
  +    /*
  +     * @see TestCase#tearDown()
  +     */
  +    protected void tearDown() throws Exception
  +    {
  +        super.tearDown();
  +    }
  +
  +    /**
  +     * Constructor for JarBuildDescriptorTest.
  +     * @param arg0
  +     */
  +    public JarBuildDescriptorTest(String arg0)
  +    {
  +        super(arg0);
  +    }
  +    
  +    
  +    public void testGetJarBuildDescriptor() throws Exception
  +    {
  +        ClassLoader l_loader = JarBuildDescriptor.class.getClassLoader() ;
  +        JarBuildDescriptor l_descriptor = JarBuildDescriptor
  +            .getJarBuildDescriptor( l_loader ) ;
  +        assertNotNull( l_descriptor ) ;
  +        
  +        JarDescriptor l_jarDescriptor = l_descriptor.getJarDescriptor() ;
  +        String l_url = l_descriptor.getDefaultRepository() ; 
  +        assertEquals( l_url, "http://www.ibiblio.org/maven" ) ;
  +        assertEquals( l_jarDescriptor.getGroup(),
  +                "avalon-repository" ) ;
  +        assertEquals( l_jarDescriptor.getName(),
  +                "avalon-repository-api" ) ;
  +        assertEquals( l_jarDescriptor.getType(),
  +                "jar" ) ;
  +    }
  +}
  
  
  
  1.2       +123 -123  avalon-sandbox/repository/spi/src/test/org/apache/avalon/repository/RepositoryLoaderTest.java
  
  Index: RepositoryLoaderTest.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/repository/spi/src/test/org/apache/avalon/repository/RepositoryLoaderTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RepositoryLoaderTest.java	6 Nov 2003 04:09:15 -0000	1.1
  +++ RepositoryLoaderTest.java	7 Nov 2003 12:50:55 -0000	1.2
  @@ -1,123 +1,123 @@
  -/*
  -
  - ============================================================================
  -                   The Apache Software License, Version 1.1
  - ============================================================================
  -
  - Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  -
  - Redistribution and use in source and binary forms, with or without modifica-
  - tion, are permitted provided that the following conditions are met:
  -
  - 1. Redistributions of  source code must  retain the above copyright  notice,
  -    this list of conditions and the following disclaimer.
  -
  - 2. Redistributions in binary form must reproduce the above copyright notice,
  -    this list of conditions and the following disclaimer in the documentation
  -    and/or other materials provided with the distribution.
  -
  - 3. The end-user documentation included with the redistribution, if any, must
  -    include  the following  acknowledgment:  "This product includes  software
  -    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
  -    Alternately, this  acknowledgment may  appear in the software itself,  if
  -    and wherever such third-party acknowledgments normally appear.
  -
  - 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
  -    "Apache Software Foundation"  must not be used to endorse or promote
  -    products derived  from this  software without  prior written
  -    permission. For written permission, please contact apache@apache.org.
  -
  - 5. Products  derived from this software may not  be called "Apache", nor may
  -    "Apache" appear  in their name,  without prior written permission  of the
  -    Apache Software Foundation.
  -
  - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  - FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
  - APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
  - INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
  - DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
  - OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
  - ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
  - (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
  - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  -
  - This software  consists of voluntary contributions made  by many individuals
  - on  behalf of the Apache Software  Foundation. For more  information on the
  - Apache Software Foundation, please see <http://www.apache.org/>.
  -
  -*/
  -
  -package org.apache.avalon.repository ;
  -
  -import junit.framework.TestCase ;
  -
  -
  -/**
  - * 
  - * 
  - * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
  - * @author $Author$
  - * @version $Revision$
  - */
  -public class RepositoryLoaderTest extends TestCase
  -{
  -
  -    public static void main(String[] args)
  -    {
  -        junit.textui.TestRunner.run(RepositoryLoaderTest.class);
  -    }
  -
  -    /*
  -     * @see TestCase#setUp()
  -     */
  -    protected void setUp() throws Exception
  -    {
  -        super.setUp();
  -    }
  -
  -    /*
  -     * @see TestCase#tearDown()
  -     */
  -    protected void tearDown() throws Exception
  -    {
  -        super.tearDown();
  -    }
  -
  -    /**
  -     * Constructor for RepositoryLoaderTest.
  -     * @param arg0
  -     */
  -    public RepositoryLoaderTest(String arg0)
  -    {
  -        super(arg0);
  -    }
  -    
  -    public void testRepositoryLoader() throws Exception
  -    {
  -        // RepositoryLoader l_loader = new RepositoryLoader() ;
  -        // assertNotNull( l_loader ) ;
  -    }
  -
  -    public void testGetBootstrapRepositories() throws Exception
  -    {
  -        //String [] l_repos = RepositoryLoader.getBootstrapRepositories() ;
  -        //assertNotNull( l_repos ) ;
  -        //assertEquals( l_repos[0], "http://dpml.net" ) ;
  -        //assertEquals( l_repos[1], "http://ibiblio.org" ) ;
  -    }
  -
  -    public void testGetDefaultConfig() throws Exception
  -    {
  -        //RepositoryLoader l_loader = new RepositoryLoader() ;
  -        //assertNotNull( l_loader ) ;
  -        //RepositoryConfig l_config = l_loader.getDefaultConfig() ;
  -        //assertNotNull( l_config ) ;
  -    }
  -
  -    public void testGetTempFile()
  -    {
  -        //@todo Implement getTempFile().
  -    }
  -
  -}
  +/*
  +
  + ============================================================================
  +                   The Apache Software License, Version 1.1
  + ============================================================================
  +
  + Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  +
  + Redistribution and use in source and binary forms, with or without modifica-
  + tion, are permitted provided that the following conditions are met:
  +
  + 1. Redistributions of  source code must  retain the above copyright  notice,
  +    this list of conditions and the following disclaimer.
  +
  + 2. Redistributions in binary form must reproduce the above copyright notice,
  +    this list of conditions and the following disclaimer in the documentation
  +    and/or other materials provided with the distribution.
  +
  + 3. The end-user documentation included with the redistribution, if any, must
  +    include  the following  acknowledgment:  "This product includes  software
  +    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
  +    Alternately, this  acknowledgment may  appear in the software itself,  if
  +    and wherever such third-party acknowledgments normally appear.
  +
  + 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
  +    "Apache Software Foundation"  must not be used to endorse or promote
  +    products derived  from this  software without  prior written
  +    permission. For written permission, please contact apache@apache.org.
  +
  + 5. Products  derived from this software may not  be called "Apache", nor may
  +    "Apache" appear  in their name,  without prior written permission  of the
  +    Apache Software Foundation.
  +
  + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  + FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
  + APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
  + INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
  + DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
  + OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
  + ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
  + (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
  + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +
  + This software  consists of voluntary contributions made  by many individuals
  + on  behalf of the Apache Software  Foundation. For more  information on the
  + Apache Software Foundation, please see <http://www.apache.org/>.
  +
  +*/
  +
  +package org.apache.avalon.repository ;
  +
  +import junit.framework.TestCase ;
  +
  +
  +/**
  + * 
  + * 
  + * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
  + * @author $Author$
  + * @version $Revision$
  + */
  +public class RepositoryLoaderTest extends TestCase
  +{
  +
  +    public static void main(String[] args)
  +    {
  +        junit.textui.TestRunner.run(RepositoryLoaderTest.class);
  +    }
  +
  +    /*
  +     * @see TestCase#setUp()
  +     */
  +    protected void setUp() throws Exception
  +    {
  +        super.setUp();
  +    }
  +
  +    /*
  +     * @see TestCase#tearDown()
  +     */
  +    protected void tearDown() throws Exception
  +    {
  +        super.tearDown();
  +    }
  +
  +    /**
  +     * Constructor for RepositoryLoaderTest.
  +     * @param arg0
  +     */
  +    public RepositoryLoaderTest(String arg0)
  +    {
  +        super(arg0);
  +    }
  +    
  +    public void testRepositoryLoader() throws Exception
  +    {
  +        //RepositoryFactory l_loader = new InitialRepositoryFactory() ;
  +        //assertNotNull( l_loader ) ;
  +    }
  +
  +    public void testGetBootstrapRepositories() throws Exception
  +    {
  +        //String [] l_repos = RepositoryLoader.getBootstrapRepositories() ;
  +        //assertNotNull( l_repos ) ;
  +        //assertEquals( l_repos[0], "http://dpml.net" ) ;
  +        //assertEquals( l_repos[1], "http://ibiblio.org" ) ;
  +    }
  +
  +    public void testGetDefaultConfig() throws Exception
  +    {
  +        //RepositoryLoader l_loader = new RepositoryLoader() ;
  +        //assertNotNull( l_loader ) ;
  +        //RepositoryConfig l_config = l_loader.getDefaultConfig() ;
  +        //assertNotNull( l_config ) ;
  +    }
  +
  +    public void testGetTempFile()
  +    {
  +        //@todo Implement getTempFile().
  +    }
  +
  +}
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message