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/kernel/impl/src/java/org/apache/avalon/merlin/impl DefaultCriteria.java
Date Thu, 01 Apr 2004 04:06:52 GMT
mcconnell    2004/03/31 20:06:52

  Modified:    merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl
                        DefaultClassLoaderModel.java
                        DefaultModelFactory.java DefaultSystemContext.java
                        DefaultSystemContextFactory.java
               merlin/composition/spi/src/java/org/apache/avalon/composition/provider
                        SystemContext.java SystemContextFactory.java
               merlin/kernel/cli/src/java/org/apache/avalon/merlin/cli
                        Main.java Resources.properties
                        Resources_de.properties Resources_fr.properties
                        Resources_pt.properties
               merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl
                        DefaultCriteria.java
  Log:
  Add anchor directory to system context, factory and classloader content creation.
  
  Revision  Changes    Path
  1.14      +1 -7      avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultClassLoaderModel.java
  
  Index: DefaultClassLoaderModel.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultClassLoaderModel.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DefaultClassLoaderModel.java	8 Mar 2004 11:28:36 -0000	1.13
  +++ DefaultClassLoaderModel.java	1 Apr 2004 04:06:52 -0000	1.14
  @@ -108,12 +108,6 @@
       private static final Resources REZ =
               ResourceManager.getPackageResources( DefaultClassLoaderModel.class );
   
  -    //private static ClassLoaderModel createClassLoaderModel( 
  -    //  ClassLoaderContext context ) throws ModelException
  -    //{
  -    //    return new DefaultClassLoaderModel( context );
  -    //}
  -
       //==============================================================
       // state
       //==============================================================
  
  
  
  1.15      +2 -2      avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultModelFactory.java
  
  Index: DefaultModelFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultModelFactory.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DefaultModelFactory.java	17 Mar 2004 10:39:10 -0000	1.14
  +++ DefaultModelFactory.java	1 Apr 2004 04:06:52 -0000	1.15
  @@ -357,7 +357,7 @@
           try
           {
               Repository repository = m_system.getRepository();
  -            File base = m_system.getBaseDirectory();
  +            File base = m_system.getAnchorDirectory();
   
               ClassLoader root = m_system.getAPIClassLoader();
               ClassLoaderDirective classLoaderDirective = 
  
  
  
  1.30      +17 -1     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.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- DefaultSystemContext.java	17 Mar 2004 10:39:10 -0000	1.29
  +++ DefaultSystemContext.java	1 Apr 2004 04:06:52 -0000	1.30
  @@ -69,6 +69,8 @@
   
       private final File m_temp;
   
  +    private final File m_anchor;
  +
       private final Repository m_repository;
   
       private final ClassLoader m_system;
  @@ -127,6 +129,7 @@
         File base, 
         File home, 
         File temp, 
  +      File anchor, 
         Repository repository, 
         String category, 
         boolean trace, 
  @@ -139,6 +142,7 @@
   
           assertNotNull( "context", context );
           assertNotNull( "base", base );
  +        assertNotNull( "anchor", anchor );
           assertNotNull( "repository", repository );
           assertNotNull( "logging", logging );
           assertNotNull( "category", category );
  @@ -155,6 +159,7 @@
           m_base = base;
           m_home = home;
           m_temp = temp;
  +        m_anchor = anchor;
           m_trace = trace;
           m_repository = repository;
           m_logging = logging;
  @@ -249,6 +254,17 @@
       public File getTempDirectory()
       {
           return m_temp;
  +    }
  +
  +   /**
  +    * Return the anchor directory from which a container 
  +    * may use to resolve relative classpath references.
  +    *
  +    * @return the anchor directory
  +    */
  +    public File getAnchorDirectory()
  +    {
  +        return m_anchor;
       }
   
      /**
  
  
  
  1.9       +27 -1     avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultSystemContextFactory.java
  
  Index: DefaultSystemContextFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultSystemContextFactory.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultSystemContextFactory.java	17 Mar 2004 10:39:10 -0000	1.8
  +++ DefaultSystemContextFactory.java	1 Apr 2004 04:06:52 -0000	1.9
  @@ -72,6 +72,8 @@
   
       private File m_temp;
   
  +    private File m_anchor;
  +
       private Repository m_repository;
   
       private LoggingManager m_logging;
  @@ -201,6 +203,15 @@
           m_temp = temp;
       }
   
  +   /**
  +    * Set the anchor directory.
  +    * @param anchor the anchor directory
  +    */
  +    public void setAnchorDirectory( File anchor )
  +    {
  +        m_anchor = anchor;
  +    }
  +
       public void setName( String name )
       {
           m_name = name;
  @@ -239,6 +250,7 @@
             getBaseDirectory(), 
             getHomeDirectory(), 
             getTempDirectory(), 
  +          getAnchorDirectory(), 
             getRepository(), 
             getName(), 
             isTraceEnabled(), 
  @@ -341,6 +353,20 @@
       {
           if( null != m_temp ) return m_temp;
           return new File( getBaseDirectory(), "temp" );
  +    }
  +
  +   /**
  +    * Return the anchor directory from which a container 
  +    * may use to establish relative classpath references. 
  +    * If undefined the value returned will default to the
  +    * basedir.
  +    *
  +    * @return the anchor directory
  +    */
  +    public File getAnchorDirectory()
  +    {
  +        if( null != m_anchor ) return m_anchor;
  +        return getBaseDirectory();
       }
   
      /**
  
  
  
  1.6       +9 -1      avalon/merlin/composition/spi/src/java/org/apache/avalon/composition/provider/SystemContext.java
  
  Index: SystemContext.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/spi/src/java/org/apache/avalon/composition/provider/SystemContext.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SystemContext.java	17 Mar 2004 10:39:11 -0000	1.5
  +++ SystemContext.java	1 Apr 2004 04:06:52 -0000	1.6
  @@ -68,6 +68,14 @@
       File getTempDirectory();
   
      /**
  +    * Return the anchor directory from which a container 
  +    * may use to resolve relative classpath references.
  +    *
  +    * @return the anchor directory
  +    */
  +    File getAnchorDirectory();
  +    
  +   /**
       * Return the application repository from which resource 
       * directives can be resolved.
       *
  
  
  
  1.7       +7 -1      avalon/merlin/composition/spi/src/java/org/apache/avalon/composition/provider/SystemContextFactory.java
  
  Index: SystemContextFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/spi/src/java/org/apache/avalon/composition/provider/SystemContextFactory.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SystemContextFactory.java	17 Mar 2004 10:39:11 -0000	1.6
  +++ SystemContextFactory.java	1 Apr 2004 04:06:52 -0000	1.7
  @@ -124,6 +124,12 @@
       void setTemporaryDirectory( File temp );
   
      /**
  +    * Set the anchor directory.
  +    * @param anchor the anchor directory
  +    */
  +    void setAnchorDirectory( File anchor );
  +
  +   /**
       * Set the name of the logging channel to be used by the 
       * system context.
       * @param name the name to assign
  
  
  
  1.23      +8 -8      avalon/merlin/kernel/cli/src/java/org/apache/avalon/merlin/cli/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/cli/src/java/org/apache/avalon/merlin/cli/Main.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- Main.java	17 Mar 2004 10:30:07 -0000	1.22
  +++ Main.java	1 Apr 2004 04:06:52 -0000	1.23
  @@ -145,11 +145,11 @@
              .withDescription( REZ.getString( "cli-repository-description" ) )
              .create( "repository" );
   
  -        Option library = OptionBuilder
  +        Option anchor = OptionBuilder
              .hasArg()
              .withArgName( REZ.getString( "directory" ) )
  -           .withDescription( REZ.getString( "cli-library-description" ) )
  -           .create( "library" );
  +           .withDescription( REZ.getString( "cli-anchor-description" ) )
  +           .create( "anchor" );
   
           Option config = OptionBuilder
              .hasArg()
  @@ -183,7 +183,7 @@
           options.addOption( context );
           options.addOption( system );
           options.addOption( repository );
  -        options.addOption( library );
  +        options.addOption( anchor );
           options.addOption( config );
           options.addOption( kernel );
           options.addOption( implementation );
  @@ -359,10 +359,10 @@
   
       private void setAnchorDirectory( Map criteria, CommandLine line )
       {
  -        if( line.hasOption( "library" ) )
  +        if( line.hasOption( "anchor" ) )
           {
  -            String library = line.getOptionValue( "library" );
  -            criteria.put( "merlin.anchor", library );
  +            String anchor = line.getOptionValue( "anchor" );
  +            criteria.put( "merlin.anchor", anchor );
           }
       }
   
  
  
  
  1.7       +1 -1      avalon/merlin/kernel/cli/src/java/org/apache/avalon/merlin/cli/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/cli/src/java/org/apache/avalon/merlin/cli/Resources.properties,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Resources.properties	23 Feb 2004 01:29:05 -0000	1.6
  +++ Resources.properties	1 Apr 2004 04:06:52 -0000	1.7
  @@ -43,6 +43,6 @@
   
   cli-repository-description=An absolute or relative path to a alternative runtime repository.
   
  -cli-library-description=A directory that serves as the anchor for relative library references.
  +cli-anchor-description=A directory that serves as the anchor for relative library references.
   
   cli-description=\nDescription: The merlin command executes the deployment of one or more
component blocks.  The [block] argument may be either an block descriptor file or a jar file
containing a block descriptor.  If no value if declared, Merlin will attempt to execute a
file named 'block.xml' in the current directory.
  
  
  
  1.5       +1 -1      avalon/merlin/kernel/cli/src/java/org/apache/avalon/merlin/cli/Resources_de.properties
  
  Index: Resources_de.properties
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/cli/src/java/org/apache/avalon/merlin/cli/Resources_de.properties,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Resources_de.properties	23 Feb 2004 01:29:05 -0000	1.4
  +++ Resources_de.properties	1 Apr 2004 04:06:52 -0000	1.5
  @@ -21,6 +21,6 @@
   cli-config-description=???
   cli-system-description=???
   cli-repository-description=???
  -cli-library-description=???
  +cli-anchor-description=???
   cli-description=???
   
  
  
  
  1.5       +1 -0      avalon/merlin/kernel/cli/src/java/org/apache/avalon/merlin/cli/Resources_fr.properties
  
  Index: Resources_fr.properties
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/cli/src/java/org/apache/avalon/merlin/cli/Resources_fr.properties,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Resources_fr.properties	23 Feb 2004 01:29:05 -0000	1.4
  +++ Resources_fr.properties	1 Apr 2004 04:06:52 -0000	1.5
  @@ -20,4 +20,5 @@
   cli-config-description=???
   cli-system-description=???
   cli-repository-description=???
  +cli-anchor-description=???
   cli-description=???
  
  
  
  1.5       +1 -1      avalon/merlin/kernel/cli/src/java/org/apache/avalon/merlin/cli/Resources_pt.properties
  
  Index: Resources_pt.properties
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/cli/src/java/org/apache/avalon/merlin/cli/Resources_pt.properties,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Resources_pt.properties	23 Feb 2004 01:29:05 -0000	1.4
  +++ Resources_pt.properties	1 Apr 2004 04:06:52 -0000	1.5
  @@ -21,5 +21,5 @@
   cli-config-description=O nome de um arquivo que sobrescreve as configurações dos componentes.
   cli-system-description=Um caminho relativo ou absoluto para uma runtime de repositório
de sistema alternativo.
   cli-repository-description=Um caminho relativo ou absoluto para uma runtime de repositório
alternativo.
  -cli-library-description=Um diretório que serve como raiz para as bibliotecas referenciadas.
  +cli-anchor-description=Um diretório que serve como raiz para as bibliotecas referenciadas.
   cli-description=\nDescrição: Executa o deployment de um ou varios blocos de componentes.
O argumento [block] pode ser tanto um descriptor em forma de arquivo ou um arquivo jar contendo
um descriptor. Se nada for especificado Merlin tentará executar a partir de um arquivo 'block.xml'
no diretório local.
  
  
  
  1.31      +1 -2      avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultCriteria.java
  
  Index: DefaultCriteria.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultCriteria.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- DefaultCriteria.java	17 Mar 2004 10:50:04 -0000	1.30
  +++ DefaultCriteria.java	1 Apr 2004 04:06:52 -0000	1.31
  @@ -133,7 +133,6 @@
       */
       private static Parameter[] buildParameters( InitialContext context )
       { 
  -
           return new Parameter[]{
               new Parameter( 
                 MERLIN_REPOSITORY,
  
  
  

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


Mime
View raw message