avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl DefaultSystemContext.java
Date Mon, 19 Jan 2004 17:37:31 GMT
mcconnell    2004/01/19 09:37:31

  Modified:    merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl
                        DefaultSystemContext.java
  Log:
  Tweak the test SystemContext static utility methods to provide something useful.
  
  Revision  Changes    Path
  1.8       +13 -7     avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultSystemContext.java
  
  Index: DefaultSystemContext.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultSystemContext.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DefaultSystemContext.java	16 Jan 2004 16:39:02 -0000	1.7
  +++ DefaultSystemContext.java	19 Jan 2004 17:37:31 -0000	1.8
  @@ -92,7 +92,8 @@
               ResourceManager.getPackageResources( DefaultSystemContext.class );
   
      /**
  -    * Creation of a new system context.
  +    * Convinience function to create a new system context. This function
  +    * is intended for test purposes only.
       *
       * @param base the base directory from which relative references 
       *   within a classpath or library directive shall be resolved
  @@ -107,22 +108,27 @@
           Logger logger = logging.getLoggerForCategory( "" );
           CacheManager cache = createCacheManager( root );
           Repository repository = cache.createRepository();
  -        final File working = new File( System.getProperty( "user.dir" ), "working" );
  -        final File home = new File( working, "home" );
  -        final File temp = new File( working, "temp" );
  +        //final File working = new File( System.getProperty( "user.dir" ), "working" );
  +        //final File home = new File( working, "home" );
  +        //final File temp = new File( working, "temp" );
  +
  +        final File home = new File( base, "home" );
  +        final File temp = new File( base, "temp" );
   
           return new DefaultSystemContext( 
             logging, base, home, temp, repository, "system", false, null );
       }
   
  -    private static CacheManager createCacheManager( File root ) throws Exception
  +    private static CacheManager createCacheManager( File root ) 
  +      throws Exception
       {
           String dpml = "http://dpml.net";
           String ibiblio = "http://www.ibiblio.org/maven";
           return new DefaultCacheManager( root, null, new String[]{ dpml, ibiblio } );
       }
   
  -    private static LoggingManager createLoggingManager( File base, int priority ) throws
Exception
  +    private static LoggingManager createLoggingManager( 
  +      File base, int priority ) throws Exception
       {
           final String level = getStringPriority( priority );
           LoggingDescriptor logging =
  
  
  

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


Mime
View raw message