mcconnell    2002/12/28 00:06:44

  Modified:    merlin/src/java/org/apache/avalon/merlin/container
                        DefaultContainer.java
               merlin/src/java/org/apache/avalon/merlin/kernel
                        DefaultKernel.java
               merlin/src/test/org/apache/avalon/merlin/kernel
                        KernelTestCase.java
  Log:
  Minor update to make sure test case runs (don't want problems while I'm away).
  
  Revision  Changes    Path
  1.11      +2 -3      
avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/container/DefaultContainer.java
  
  Index: DefaultContainer.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/container/DefaultContainer.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DefaultContainer.java     28 Dec 2002 01:32:02 -0000      1.10
  +++ DefaultContainer.java     28 Dec 2002 08:06:43 -0000      1.11
  @@ -193,9 +193,8 @@
           if( getLogger().isDebugEnabled() )
           {
               getLogger().debug( "initialization: " + m_path + " (" + 
profiles.length + ")" );
  +            //getLogger().debug( "configuration array:\n" + 
ConfigurationUtil.list( m_targets ) );
           }
  -
  -        getLogger().info( "configuration array:\n" + ConfigurationUtil.list( 
m_targets ) );
   
           for( int i=0; i<profiles.length; i++ )
           {
  
  
  
  1.18      +6 -3      
avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/kernel/DefaultKernel.java
  
  Index: DefaultKernel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/kernel/DefaultKernel.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- DefaultKernel.java        28 Dec 2002 01:34:04 -0000      1.17
  +++ DefaultKernel.java        28 Dec 2002 08:06:43 -0000      1.18
  @@ -161,7 +161,7 @@
           int i = config.getChildren("configuration").length;
           if( i < 1 )
           {
  -            return new DefaultConfiguration( "default", 
DefaultKernel.class.getName() );
  +            return new DefaultConfiguration( "configuration", 
DefaultKernel.class.getName() );
           }
           return ConfigurationUtil.matchFirstOccurance( config, 
"configuration", "target", name );
       }
  @@ -588,7 +588,10 @@
       private Block loadPhysicalBlock( Configuration config, Context system )
         throws Exception
       {
  -        getLogger().info( "block configuration: \n" + 
ConfigurationUtil.list( config ) );
  +        if( getLogger().isDebugEnabled() )
  +        {
  +            getLogger().debug( "block configuration: \n" + 
ConfigurationUtil.list( config ) );
  +        }
   
           //
           // get the basic information for the block declaration
  
  
  
  1.5       +0 -61     
avalon-sandbox/merlin/src/test/org/apache/avalon/merlin/kernel/KernelTestCase.java
  
  Index: KernelTestCase.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/src/test/org/apache/avalon/merlin/kernel/KernelTestCase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- KernelTestCase.java       19 Dec 2002 10:50:17 -0000      1.4
  +++ KernelTestCase.java       28 Dec 2002 08:06:44 -0000      1.5
  @@ -63,28 +63,8 @@
           context.put( "urn:assembly:home", base );
           context.makeReadOnly();
   
  -        File file = getConfigurationFile( base, args );
  -        if( !file.exists() )
  -        {
  -            final String error = 
  -              "Missing kernel configuration: " + file;
  -            throw new RuntimeException( error );
  -        }
  -
  -        Configuration config;
           try
           {
  -            config = getConfiguration( file );
  -        }
  -        catch( Throwable e )
  -        {
  -            final String error = "Problem loading kernel configuration from 
file: " + file;
  -            throw new RuntimeException( error );
  -        }
  -
  -        try
  -        {
  -            m_kernel.configure( config );
               m_kernel.contextualize( context );
               m_kernel.initialize();
               m_kernel.start();
  @@ -103,49 +83,8 @@
        * Get the target configuration file.
        * @param args the command line arguments
        */
  -    public File getConfigurationFile( File base, String[] args )
  -    {
  -        String filename;
  -        if( args.length > 0 )
  -        {
  -            filename = args[ 0 ];
  -        }
  -        else
  -        {
  -            filename = "kernel.xml";
  -        }
  -        return new File( base, filename );
  -    }
  -
  -    /**
  -     * Get the target configuration file.
  -     * @param args the command line arguments
  -     */
       public File getWorkingDirectory( )
       {
           return new File( System.getProperty( "user.dir" ) );
       }
  -
  -
  -    private Configuration getConfiguration( final File file ) throws 
ConfigurationException
  -    {
  -        try
  -        {
  -            DefaultConfigurationBuilder builder = new 
DefaultConfigurationBuilder();
  -            InputStream is = new FileInputStream( file );
  -            if( is == null )
  -            {
  -                throw new ConfigurationException(
  -                    "Could not load the configuration resource \"" + file + 
"\"" );
  -            }
  -            return builder.build( is );
  -        }
  -        catch( Throwable e )
  -        {
  -            final String error = "Unable to create configuration from file: 
" + file;
  -            throw new ConfigurationException( error, e );
  -        }
  -    }
  -
  -
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to