avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon/repository/main/src/java/org/apache/avalon/repository/main AbstractBuilder.java DefaultBuilder.java DefaultInitialContext.java
Date Sat, 06 Dec 2003 23:51:08 GMT
mcconnell    2003/12/06 15:51:08

  Modified:    repository/main/src/java/org/apache/avalon/repository/main
                        AbstractBuilder.java DefaultBuilder.java
                        DefaultInitialContext.java
  Log:
  Sync. with updates to utilities.
  
  Revision  Changes    Path
  1.2       +3 -4      avalon/repository/main/src/java/org/apache/avalon/repository/main/AbstractBuilder.java
  
  Index: AbstractBuilder.java
  ===================================================================
  RCS file: /home/cvs/avalon/repository/main/src/java/org/apache/avalon/repository/main/AbstractBuilder.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractBuilder.java	4 Dec 2003 19:34:42 -0000	1.1
  +++ AbstractBuilder.java	6 Dec 2003 23:51:08 -0000	1.2
  @@ -55,16 +55,15 @@
   import java.util.Map ;
   
   import java.lang.reflect.Constructor;
  -import java.lang.reflect.Method ;
   import java.lang.reflect.InvocationTargetException ;
  +import java.lang.reflect.Method ;
   
   import javax.naming.directory.Attributes;
   
  -import org.apache.avalon.util.factory.Factory;
  -
   import org.apache.avalon.repository.Artifact;
   import org.apache.avalon.repository.RepositoryException;
   import org.apache.avalon.repository.RepositoryRuntimeException;
  +import org.apache.avalon.repository.provider.Factory;
   import org.apache.avalon.repository.provider.InitialContext;
   
   
  
  
  
  1.3       +2 -2      avalon/repository/main/src/java/org/apache/avalon/repository/main/DefaultBuilder.java
  
  Index: DefaultBuilder.java
  ===================================================================
  RCS file: /home/cvs/avalon/repository/main/src/java/org/apache/avalon/repository/main/DefaultBuilder.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultBuilder.java	5 Dec 2003 08:26:31 -0000	1.2
  +++ DefaultBuilder.java	6 Dec 2003 23:51:08 -0000	1.3
  @@ -69,9 +69,9 @@
   import org.apache.avalon.repository.meta.FactoryDescriptor;
   import org.apache.avalon.repository.provider.Builder;
   import org.apache.avalon.repository.provider.InitialContext;
  +import org.apache.avalon.repository.provider.Factory;
   import org.apache.avalon.util.env.Env;
   import org.apache.avalon.util.exception.ExceptionHelper;
  -import org.apache.avalon.util.factory.Factory;
   
   
   /**
  
  
  
  1.4       +27 -9     avalon/repository/main/src/java/org/apache/avalon/repository/main/DefaultInitialContext.java
  
  Index: DefaultInitialContext.java
  ===================================================================
  RCS file: /home/cvs/avalon/repository/main/src/java/org/apache/avalon/repository/main/DefaultInitialContext.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultInitialContext.java	5 Dec 2003 08:26:31 -0000	1.3
  +++ DefaultInitialContext.java	6 Dec 2003 23:51:08 -0000	1.4
  @@ -81,6 +81,7 @@
   import org.apache.avalon.repository.RepositoryException;
   import org.apache.avalon.repository.RepositoryRuntimeException;
   import org.apache.avalon.repository.meta.FactoryDescriptor;
  +import org.apache.avalon.repository.provider.Factory;
   import org.apache.avalon.repository.provider.InitialContext;
   import org.apache.avalon.repository.util.LOADER;
   import org.apache.avalon.repository.util.RepositoryUtils;
  @@ -88,7 +89,6 @@
   import org.apache.avalon.util.env.Env;
   import org.apache.avalon.util.env.EnvAccessException;
   import org.apache.avalon.util.exception.ExceptionHelper;
  -import org.apache.avalon.util.factory.Factory;
   
   
   /**
  @@ -149,6 +149,18 @@
       /**
        * Creates an initial repository context.
        * 
  +     * @throws RepositoryException if an error occurs during establishment
  +     */
  +    public DefaultInitialContext( ) 
  +        throws RepositoryException
  +    {
  +         this( null );
  +    }
  +
  +
  +    /**
  +     * Creates an initial repository context.
  +     * 
        * @param hosts a set of initial remote repository addresses 
        * @throws RepositoryException if an error occurs during establishment
        */
  @@ -188,10 +200,20 @@
           Properties avalonWork = getLocalProperties( USER_DIR, AVALON );
           
           m_cache = setupCache( cache, avalonHome, avalonWork );
  -        System.out.println( "Initial-Cache: " + m_cache );
  -
           m_hosts = setupHosts( hosts, avalonHome, avalonWork );
   
  +        if( true )
  +        {
  +            System.out.println( "Initial-Cache: " + m_cache );
  +            StringBuffer buffer = new StringBuffer( "Initial-Hosts: " );
  +            for( int i=0; i<m_hosts.length; i++ )
  +            {
  +                if( i>0 ) buffer.append( "," );
  +                buffer.append( m_hosts[i] );
  +            }
  +            System.out.println( buffer.toString() );
  +        }
  +
           Artifact implementation = 
             setupImplementation( artifact );
   
  @@ -199,10 +221,7 @@
           // Create the temporary directory to pull down files into
           //
   
  -        if ( ! m_cache.exists() )
  -        {
  -            m_cache.mkdirs();
  -        }
  +        if ( ! m_cache.exists() ) m_cache.mkdirs();
   
           //
           // Build the url to access the properties of the implementation artifact
  @@ -210,7 +229,6 @@
           //
   
           Attributes attributes = loadAttributes( m_cache, m_hosts, implementation );
  -        
           FactoryDescriptor descriptor = new FactoryDescriptor( attributes );
           String factory = descriptor.getFactory();
           if( null == factory ) 
  
  
  

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


Mime
View raw message