avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject cvs commit: avalon-sandbox/repository/spi/src/test/org/apache/avalon/repository JarBuildDescriptorTest.java RepositoryLoaderTest.java
Date Thu, 06 Nov 2003 04:09:15 GMT
akarasulu    2003/11/05 20:09:15

  Added:       repository/spi .cvsignore project.xml
               repository/spi/src/java/org/apache/avalon/repository
                        ArtifactDescriptor.java BlockManifest.java
                        InitialRepositoryFactory.java
                        JarBuildDescriptor.java JarDescriptor.java
                        ProxyContext.java Repository.java
                        RepositoryConfig.java RepositoryException.java
                        RepositoryFactory.java package.html
                        repository.properties
               repository/spi/src/test/org/apache/avalon/repository
                        JarBuildDescriptorTest.java
                        RepositoryLoaderTest.java
  Log:
  Going to town on the repository in the sandbox
  
  Revision  Changes    Path
  1.1                  avalon-sandbox/repository/spi/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  maven.log
  velocity.log
  build.properties
  target
  .classpath
  .project
  
  
  1.1                  avalon-sandbox/repository/spi/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-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>
  
  
  
  1.1                  avalon-sandbox/repository/spi/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: akarasulu $
   * @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, l_semiColon ) ;
          m_version = a_spec.substring( l_semiColon ) ;
      }
      
      
      /**
       * 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/spi/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/06 04:09:15 $
   */
  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/spi/src/java/org/apache/avalon/repository/InitialRepositoryFactory.java
  
  Index: InitialRepositoryFactory.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.File ;
  import java.io.IOException ;
  import java.io.InputStream ;
  import java.io.FileOutputStream ;
  
  import java.util.ArrayList ;
  import java.util.Properties ;
  import java.util.Enumeration ;
  
  import java.net.URL ;
  import java.net.URLConnection ;
  import java.net.URLClassLoader ;
  import java.net.HttpURLConnection ;
  import java.net.MalformedURLException ;
  
  
  /**
   * Sets up the environment to create repositories by downloading the required 
   * jars, preparing a ClassLoader and delegating calls to repository factory 
   * methods using a newly configured ClassLoader.
   * 
   * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
   * @author $Author: akarasulu $
   * @version $Revision: 1.1 $
   */
  public class InitialRepositoryFactory implements RepositoryFactory
  {
      /** base property key for the urls of the required jars */
      public static final String URLS_BASE = "url" ;
      /** factory delegate implementation class name key */
      public static final String FACTORY_KEY = "factory" ;
      /** the properties file containing seed information */
      public static final String PROPS = "repository.properties" ;
  
      /** repository loader's bootstrap properties */
      private static Properties s_props = null ;
      
      /** the delegate repository factory instantiated */
      private RepositoryFactory m_delegate = null ;
  
      
      // ------------------------------------------------------------------------
      // C O N S T R U C T O R S
      // ------------------------------------------------------------------------
      
      
      /**
       * Creates a repository loader which loads a default repository factory 
       * and delegates calls to it.
       * 
       * @throws RepositoryException
       */
      public InitialRepositoryFactory() throws RepositoryException
      {
          /* 
           * Create the temporary directory to pull down files into
           */
          String l_userHome = System.getProperty( "user.home" ) ;
          File l_tmpDir = new File( l_userHome, ".bootstrap" ) ;
          if ( ! l_tmpDir.exists() )
          {
              l_tmpDir.mkdirs() ;
          }
          
          JarBuildDescriptor l_myBuild = JarBuildDescriptor
              .getJarBuildDescriptor( InitialRepositoryFactory.class.getClassLoader() ) ; 
          
          /*
           * Load default bootstrap (seed) properties
           */
          Properties l_props = new Properties() ;
          try
          {
              Class l_clazz = InitialRepositoryFactory.class ;
              l_props.load( l_clazz.getResourceAsStream( PROPS ) ) ;
          }
          catch( IOException e )
          {
              throw new RepositoryException( "Failed to read " + PROPS, e ) ;
          }
          
          /*
           * Pull down all jars required to bootstrap the repository 
           */
          ArrayList l_urlsList = new ArrayList() ;
          Enumeration l_list = l_props.propertyNames() ;
          while ( l_list.hasMoreElements() )
          {
              String l_key = ( String ) l_list.nextElement() ;
              
              if ( ! l_key.startsWith( URLS_BASE ) )
              {
                  continue ;
              }
              
              String l_url = l_props.getProperty( l_key ) ;
              int l_fileIdx = l_url.lastIndexOf( '/' ) ;
              String l_fileName = l_url.substring( l_fileIdx + 1 ) ;
              File l_localFile = new File( l_tmpDir, l_fileName ) ;
              boolean l_isSuccess = false ;
              
              try
              {
                  l_isSuccess = getTempFile( l_url, l_localFile, true ) ;
              }
              catch ( Exception e )
              {
                  throw new RepositoryException( 
                      "Failed to download bootstrap jar: " + l_url, e ) ;
              }
              
              try
              {
                  l_urlsList.add( new URL( l_url ) ) ;
              }
              catch ( MalformedURLException e )
              {
                  throw new RepositoryException( l_url + " not a valid URL", e ) ;
              }
          }
          
          /*
           * Check that we have the factory implementation for the delegate
           */
          if ( ! l_props.containsKey( FACTORY_KEY ) )
          {
              throw new RepositoryException( "Factory property " + FACTORY_KEY 
                      + " must be defined for a factory implementation." ) ;
          }
  
          /*
           * Create the factory class loaders and instantiate the delegate factory
           */
          String l_factory = l_props.getProperty( FACTORY_KEY ) ;
          ClassLoader l_loader = new URLClassLoader( ( URL [] ) 
                  l_urlsList.toArray( new URL [0] ), 
                  Thread.currentThread().getContextClassLoader() ) ;
          try
          {
              Class l_clazz = l_loader.loadClass( l_factory ) ;
              m_delegate = ( RepositoryFactory ) l_clazz.newInstance() ;
          }
          catch( IllegalAccessException e )
          {
              throw new RepositoryException( "Could not default constructor on: " 
                  + l_factory, e ) ;
          }
          catch( InstantiationException e )
          {
              throw new RepositoryException( 
                  "Could not instantiate the factory class: " + l_factory, e ) ;
          }
          catch( ClassNotFoundException e )
          {
              throw new RepositoryException( "Could not find the factory class: " 
                  + l_factory, e ) ;
          }
      }
  
  
      // ------------------------------------------------------------------------
      // RepositoryFactory Implementations
      // ------------------------------------------------------------------------
  
      
      /**
       * Factory method that creates a repository by calling the delegate factory.
       * 
       * @param a_config a repository configuration bean
       * @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)
       */
      public Repository create( RepositoryConfig a_config ) 
          throws RepositoryException 
      {
          return m_delegate.create( a_config ) ;
      }
  
      
      /**
       * Factory method that creates a default repository configuration bean 
       * by calling the delegate factory.
       * 
       * @see org.apache.avalon.repository.RepositoryFactory#getDefaultConfig()
       */
      public RepositoryConfig getDefaultConfig() throws RepositoryException
      {
          return m_delegate.getDefaultConfig() ;
      }
      
      
      // ------------------------------------------------------------------------
      // Utility Methods
      // ------------------------------------------------------------------------
  
      
      private static Properties getProperties()
      {
          if ( null == s_props )
          {
              s_props = new Properties() ;
              
              try 
              {
                  s_props.load( InitialRepositoryFactory.class
                      .getResourceAsStream( PROPS ) ) ;
              }
              catch ( IOException e )
              {
                  e.printStackTrace() ;
              }
          }
          
          return s_props ;
      }
      
      
      /**
       * Gets the urls of remote repositories used to bootstrap.
       *
       * @return the set of remote repo urls to bootstrap from
       */
      public static String [] getBootstrapRepositories()
      {
          Properties l_props = getProperties() ; // getBootstrapProperties( 
              //RepositoryLoader.class.getClassLoader(), 
              //RepositoryException.class, PROPS ) ;
          
          ArrayList l_values = new ArrayList() ;
          Enumeration l_list = l_props.propertyNames() ;
          while ( l_list.hasMoreElements() )
          {
              String l_key = ( String ) l_list.nextElement() ;
              
              if ( l_key.startsWith( URLS_BASE ) )
              {
                  l_values.add( l_props.getProperty( l_key ) ) ;
              }
          }
  
          return ( String [] ) l_values.toArray( new String [0] ) ;
      }
  
      
      /**
       * Attempts to download and cache a remote artifact trying a set of remote
       * repositories.  The operation is not fail fast and so it keeps trying if
       * the first repository does not have the artifact in question.
       * 
       * @param a_artifact the artifact to retrieve and cache
       * @param a_destFile where to store it locally in the cache
       * @param a_useTimestamp whether to check the modified timestamp on the
       *      <code>destinationFile</code> against the remote <code>source</code>
       * @return TRUE if the file was updated else FALSE
       */
      public static boolean cacheArtifact( ArtifactDescriptor a_artifact, 
          File a_destFile, boolean a_useTimestamp ) 
          throws RepositoryException
      {
          String [] l_srcs = getBootstrapRepositories() ;
          return cacheArtifact( a_artifact, l_srcs, a_destFile, a_useTimestamp ) ;
      }
      
      
      /**
       * Attempts to download and cache a remote artifact trying a set of remote
       * repositories.  The operation is not fail fast and so it keeps trying if
       * the first repository does not have the artifact in question.
       * 
       * @param a_artifact the artifact to retrieve and cache
       * @param a_repos the remote repositories to try to download from 
       * @param a_destFile where to store it locally in the cache
       * @param a_useTimestamp whether to check the modified timestamp on the
       *      <code>destinationFile</code> against the remote <code>source</code>
       * @return TRUE if the file was updated else FALSE
       */
      public static boolean cacheArtifact( ArtifactDescriptor a_artifact, 
          String [] a_repos, File a_destFile, boolean a_useTimestamp ) 
          throws RepositoryException
      {
          boolean l_updated = false ;
          Exception l_cause = null ;
          
          /*
           * Don't fail fast - keep trying until we get something.
           */
          for ( int ii = 0; ii < a_repos.length; ii++ )
          {
              try 
              {
                  String l_url = a_artifact.getUrl( a_repos[ii] ) ;
                  l_updated = getTempFile( l_url, a_destFile, a_useTimestamp ) ;
                  return l_updated ;
              }
              catch ( Exception e )
              {
                  l_cause = e ;
              }
          }
          
          if ( null == l_cause )
          {
              throw new RepositoryException( "Failed to download artifact to "
                  + "local cache file " + a_destFile.getAbsolutePath() ) ;
          }
  
          // Should not really execute but it shuts up the compiler
          throw new RepositoryException( "Failed to download artifact to "
              + "local cache file " + a_destFile.getAbsolutePath(), l_cause ) ;
      }
  
  
      /**
       * Retrieve a remote file.  Returns true if the file was successfully
       * retrieved or if it is up to date (when the useTimestamp flag is set).
       * 
       * Moved here from HttpController.
       *
       * @param a_url the of the file to retrieve
       * @param a_destFile where to store it
       * @param a_useTimestamp whether to check the modified timestamp on the
       *      <code>destinationFile</code> against the remote <code>source</code>
       * @return TRUE if the file was updated else FALSE
       */
      public static boolean getTempFile( String a_url, File a_destFile,
          boolean a_useTimestamp ) throws Exception
      {
          URL l_source = null ; 
          String l_username = null ;
          String l_password = null ;
  
          // We want to be able to deal with Basic Auth where the username
          // and password are part of the URL. An example of the URL string
          // we would like to be able to parse is like the following:
          //
          // http://username:password@repository.mycompany.com
  
          int l_atIdx = a_url.indexOf( "@" ) ;
          if ( l_atIdx > 0 )
          {
              String s = a_url.substring( 7, l_atIdx ) ;
              int l_colonIdx = s.indexOf( ":" ) ;
              l_username = s.substring( 0, l_colonIdx ) ;
              l_password = s.substring( l_colonIdx + 1 ) ;
              l_source = new URL( "http://" + a_url.substring( l_atIdx + 1 ) ) ;
          }
          else
          {
              l_source = new URL( a_url ) ;
          }
  
          //set the timestamp to the file date.
          long l_timestamp = 0 ;
          boolean l_hasTimestamp = false ;
          if ( a_useTimestamp && a_destFile.exists() )
          {
              l_timestamp = a_destFile.lastModified() ;
              l_hasTimestamp = true ;
          }
  
          //set up the URL connection
          URLConnection l_connection = l_source.openConnection() ;
  
          //modify the headers
          //NB: things like user authentication could go in here too.
          if ( a_useTimestamp && l_hasTimestamp )
          {
              l_connection.setIfModifiedSince( l_timestamp ) ;
          }
  
          //connect to the remote site (may take some time)
          l_connection.connect() ;
          //next test for a 304 result (HTTP only)
          if ( l_connection instanceof HttpURLConnection )
          {
              HttpURLConnection l_httpConnection = 
                  ( HttpURLConnection ) l_connection ;
              
              if ( l_httpConnection.getResponseCode() == 
                      HttpURLConnection.HTTP_NOT_MODIFIED )
              {
                  return false ;
              }
              
              // test for 401 result (HTTP only)
              if ( l_httpConnection.getResponseCode() == 
                      HttpURLConnection.HTTP_UNAUTHORIZED )
              {
                  throw new Exception( "Not authorized." ) ;
              }
          }
  
          // REVISIT: at this point even non HTTP connections may support the
          // if-modified-since behaviour - we just check the date of the
          // content and skip the write if it is not newer.
          // Some protocols (FTP) dont include dates, of course.
  
          InputStream l_in = null ;
          for ( int ii = 0; ii < 3; ii++ )
          {
              try
              {
                  l_in = l_connection.getInputStream() ;
                  break ;
              }
              catch ( IOException ex )
              {
                  // do nothing
              }
          }
          if ( l_in == null )
          {
              final String error = 
                "Connection returned a null input stream: " + a_url ;
              throw new IOException( error ) ;
          }
  
          File parent = a_destFile.getParentFile() ;
          parent.mkdirs() ;
  
          FileOutputStream l_out = new FileOutputStream( a_destFile ) ;
  
          byte[] buffer = new byte[100 * 1024] ;
          int length ;
  
          System.out.print( "Source: " + l_source + "\n") ;
          while ( ( length = l_in.read( buffer ) ) >= 0 )
          {
              l_out.write( buffer, 0, length ) ;
              System.out.print( "." ) ;
          }
  
          System.out.println( "" ) ;
          l_out.close() ;
          l_in.close() ;
  
          // if (and only if) the use file time option is set, then the
          // saved file now has its timestamp set to that of the downloaded
          // file
  
          if ( a_useTimestamp )
          {
              long l_remoteTimestamp = l_connection.getLastModified() ;
  
              if ( l_remoteTimestamp != 0 )
              {
                  long l_modifiedTime ;
  
                  if ( l_remoteTimestamp  < 0 )
                  {
                      l_modifiedTime = System.currentTimeMillis() ;
                  }
                  else
                  {
                      l_modifiedTime = l_remoteTimestamp  ;
                  }
  
                  a_destFile.setLastModified( l_modifiedTime ) ;
                  return true ;
              }
          }
          
          return true ;
      }
  }
  
  
  
  1.1                  avalon-sandbox/repository/spi/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: akarasulu $
   * @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/spi/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: akarasulu $
   * @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/spi/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/06 04:09:15 $
   */
  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/spi/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/06 04:09:15 $
   */
  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/spi/src/java/org/apache/avalon/repository/RepositoryConfig.java
  
  Index: RepositoryConfig.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 parameters bean.
   * 
   * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
   * @author $Author: akarasulu $
   * @version $Revision: 1.1 $
   */
  public class RepositoryConfig
  {
      /** the set of remote repositories to pull jars from */
      private URL [] m_remoteRepositories = null ; 
  
      /** the path to the local repository that caches remote artifacts */
      private String m_cacheDir = null ; 
  
      /** descriptor for proxy used to access remote repositories */
      private ProxyContext m_proxyCtx = null ;
      
      
      /**
       * Gets the ProxyContext used by the Kernel to access remote repositories.
       * 
       * @return the proxy context used by the Kernel
       */
      public ProxyContext getProxyContext()
      {
          return m_proxyCtx ;
      }
  
  
      /**
       * Sets the ProxyContext for this KernelConfig.
       * 
       * @param a_proxyCtx sets the proxy context
       */
      public void setProxyContext( ProxyContext a_proxyCtx )
      {
          m_proxyCtx = a_proxyCtx ;
      }
  
  
      /**
       * Gets the set of remote repositories used to download artifacts.
       * 
       * @return the remote repositories to use
       */
      public URL[] getRemoteRepositories()
      {
          return m_remoteRepositories ;
      }
  
      
      /**
       * Gets the remote repository urls for downloading artifacts.
       * 
       * @param a_remoteRepositories the remote Repositories to use.
       */
      public void setRemoteRepositoryUrls( URL[] a_remoteRepositories )
      {
          m_remoteRepositories = a_remoteRepositories ;
      }
      
      
      /**
       * Sets the remote repository urls for downloading artifacts.
       * 
       * @param urls the remote Repositories to use.
       */
      public void setRemoteRepositoryUrls( String[] urls )
          throws MalformedURLException
      {
          URL [] a_urls = new URL [urls.length] ;
          
          for ( int ii = 0; ii < a_urls.length; ii++ )
          {
              a_urls[ii] = new URL( urls[ii] ) ;
          }
          
          
          m_remoteRepositories = a_urls ;
      }
      
      
      /**
       * Gets the directory where repository artifacts are stored after being 
       * downloaded from the Repository.
       * 
       * @return the place to cache repository artifacts
       */
      public String getCacheDir()
      {
          return m_cacheDir ;
      }
  
      
      /**
       * Sets the directory where we store downloaded artifacts.
       * 
       * @param a_cacheDir the place to cache repository artifacts
       */
      public void setCacheDir( String a_cacheDir )
      {
          m_cacheDir = a_cacheDir ;
      }
  }
  
  
  
  1.1                  avalon-sandbox/repository/spi/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/06 04:09:15 $
   */
  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/spi/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: akarasulu $
   * @version $Revision: 1.1 $
   */
  public interface RepositoryFactory
  {
      /**
       * Creates a new default configuration bean populated with default values.
       *  
       * @return a default configuration bean used for Repository creation
       * @throws RepositoryException if there is a problem generating defaults
       */
      RepositoryConfig getDefaultConfig() throws RepositoryException ;
  
      /**
       * Creates a new Repository using a configuration bean. 
       * 
       * @param a_config the Repository configuration bean
       * @return the newly created Repository
       * @throws RepositoryException if there is a problem creating the Repository
       */
      Repository create( RepositoryConfig a_config ) throws RepositoryException ;
  }
  
  
  
  1.1                  avalon-sandbox/repository/spi/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.1                  avalon-sandbox/repository/spi/src/java/org/apache/avalon/repository/repository.properties
  
  Index: repository.properties
  ===================================================================
  cache.dir=.repository
  
  factory=org.apache.avalon.repository.impl.DefaultFactory
  
  remote.repository.url.0=http://dpml.net
  
  remote.repository.url.1=http://ibiblio.org/maven
  
  #No longer defined here!
  #url.1=http://dpml.net/avalon-repository/jars/avalon-repository-impl-1.1-dev.jar
  
  #No longer defined here!
  #url.2=http://dpml.net/avalon-util/jars/avalon-util-defaults-1.0-dev.jar
  
  #No longer defined here!
  #url.3=http://dpml.net/avalon-util/jars/avalon-util-env-1.0-dev.jar
  
  
  
  
  1.1                  avalon-sandbox/repository/spi/src/test/org/apache/avalon/repository/JarBuildDescriptorTest.java
  
  Index: JarBuildDescriptorTest.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 junit.framework.TestCase;
  
  
  /**
   * @todo
   * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
   * @author $Author: akarasulu $
   * @version $Revision: 1.1 $
   */
  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" ) ;
      }
  }
  
  
  
  1.1                  avalon-sandbox/repository/spi/src/test/org/apache/avalon/repository/RepositoryLoaderTest.java
  
  Index: RepositoryLoaderTest.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 junit.framework.TestCase ;
  
  
  /**
   * 
   * 
   * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
   * @author $Author: akarasulu $
   * @version $Revision: 1.1 $
   */
  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().
      }
  
  }
  
  
  

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


Mime
View raw message