avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/merlin/merlin-platform/tutorials/configuration/src/java/tutorial HelloComponent.java HelloComponent.xconfig HelloComponent.xinfo
Date Sat, 14 Jun 2003 08:45:59 GMT
mcconnell    2003/06/14 01:45:59

  Added:       merlin/merlin-platform/tutorials/configuration .cvsignore
                        maven.xml project.xml
               merlin/merlin-platform/tutorials/configuration/block
                        .cvsignore README.TXT maven.xml project.xml
               merlin/merlin-platform/tutorials/configuration/block/conf
                        block.xml
               merlin/merlin-platform/tutorials/configuration/block/src/java/tutorial
                        HelloComponent.java HelloComponent.xconfig
               merlin/merlin-platform/tutorials/configuration/defaults
                        .cvsignore README.TXT maven.xml project.xml
               merlin/merlin-platform/tutorials/configuration/defaults/conf
                        block.xml
               merlin/merlin-platform/tutorials/configuration/defaults/src/java/tutorial
                        HelloComponent.java HelloComponent.xconfig
               merlin/merlin-platform/tutorials/configuration/override
                        .cvsignore README.TXT maven.xml project.xml
               merlin/merlin-platform/tutorials/configuration/override/conf
                        block.xml config.xml
               merlin/merlin-platform/tutorials/configuration/override/src/java/tutorial
                        HelloComponent.java HelloComponent.xconfig
               merlin/merlin-platform/tutorials/configuration/simple
                        .cvsignore README.TXT maven.xml project.xml
               merlin/merlin-platform/tutorials/configuration/simple/src/java/tutorial
                        HelloComponent.java
  Removed:     merlin/merlin-platform/tutorials/configuration build.xml
               merlin/merlin-platform/tutorials/configuration/src/config
                        block.xml config.xml
               merlin/merlin-platform/tutorials/configuration/src/java/tutorial
                        HelloComponent.java HelloComponent.xconfig
                        HelloComponent.xinfo
  Log:
  Update from ant to maven based builds and seperation of distinct tutorial phases.
  
  Revision  Changes    Path
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  maven.log
  velocity.log
  build.properties
  target
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/maven.xml
  
  Index: maven.xml
  ===================================================================
  <project default="java:jar" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util">
  
    <preGoal name="java:compile">
      <attainGoal name="merlin:meta"/>
    </preGoal>
  
    <postGoal name="jar:jar">
      <!--<attainGoal name="merlin:deploy"/>-->
    </postGoal>
  
  </project>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <project>
  
    <groupId>merlin</groupId>
    <id>merlin-tutorial-configuration</id>
    <name>Merlin Configuration Tutorial</name>
    <package>tutorial</package>
  
    <currentVersion>1.0</currentVersion>
    <inceptionYear>2003</inceptionYear>
    <shortDescription>Merlin Configuration Tutorial.</shortDescription>
  
    <dependencies>
      <dependency>
        <groupId>avalon</groupId>
        <artifactId>avalon-framework</artifactId>
        <version>4.1.4</version>
      </dependency>
    </dependencies>
    
    <build>
  
      <sourceDirectory>${basedir}/src/java</sourceDirectory>
  
      <resources>
        <resource>
          <directory>${maven.conf.dir}</directory>
          <targetPath>BLOCK-INF</targetPath>
          <includes>
            <include>block.xml</include>
          </includes>
        </resource>
        <resource>
          <directory>${maven.src.dir}/java</directory>
          <includes>
            <include>**/*.xtype</include>
            <include>**/*.xinfo</include>
            <include>**/*.xconfig</include>
          </includes>
        </resource>
      </resources>
  
      <jars></jars>
  
    </build>
  
  </project>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/block/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  maven.log
  velocity.log
  build.properties
  target
  logs
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/block/README.TXT
  
  Index: README.TXT
  ===================================================================
  
  Configuration Management
  ------------------------
  
  This tutorial covers the declaration of an overriding configuration in the block.xml deployment
directive.
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/block/maven.xml
  
  Index: maven.xml
  ===================================================================
  <project default="java:jar" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util">
  
    <preGoal name="java:compile">
      <attainGoal name="merlin:meta"/>
    </preGoal>
  
  </project>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/block/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <project>
  
    <groupId>merlin</groupId>
    <id>merlin-tutorial-configuration</id>
    <name>Merlin Configuration Tutorial</name>
    <package>tutorial</package>
  
    <currentVersion>1.0</currentVersion>
    <inceptionYear>2003</inceptionYear>
    <shortDescription>Merlin Configuration Tutorial.</shortDescription>
  
    <dependencies>
      <dependency>
        <groupId>avalon</groupId>
        <artifactId>avalon-framework</artifactId>
        <version>4.1.4</version>
      </dependency>
    </dependencies>
    
    <build>
  
      <sourceDirectory>${basedir}/src/java</sourceDirectory>
  
      <resources>
        <resource>
          <directory>${maven.conf.dir}</directory>
          <targetPath>BLOCK-INF</targetPath>
          <includes>
            <include>block.xml</include>
          </includes>
        </resource>
        <resource>
          <directory>${maven.src.dir}/java</directory>
          <includes>
            <include>**/*.x*</include>
          </includes>
        </resource>
      </resources>
  
      <jars></jars>
  
    </build>
  
  </project>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/block/conf/block.xml
  
  Index: block.xml
  ===================================================================
  
  <block>
  
     <info>
       <name>tutorial</name>
     </info>
  
     <implementation>
       <component name="hello" class="tutorial.HelloComponent" activation="startup">
         <configuration>
           <source>explicit configuration within block</source>
         </configuration>
       </component>
     </implementation>
  
  </block>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/block/src/java/tutorial/HelloComponent.java
  
  Index: HelloComponent.java
  ===================================================================
  
  package tutorial;
  
  import org.apache.avalon.framework.logger.AbstractLogEnabled;
  import org.apache.avalon.framework.activity.Initializable;
  import org.apache.avalon.framework.configuration.Configurable;
  import org.apache.avalon.framework.configuration.Configuration;
  import org.apache.avalon.framework.configuration.ConfigurationException;
  
  /**
   * A configurable component.
   *
   * @avalon.meta.version 1.0
   * @avalon.meta.name simple
   */
  public class HelloComponent extends AbstractLogEnabled 
    implements Configurable, Initializable
  {
      private String m_source = "undefined";
  
     /**
      * Configuration of the component by the container.  The 
      * implementation get a child element named 'source' and 
      * assigns the value of the element to a local variable.
      *
      * @param config the component configuration
      * @exception ConfigurationException if a configuration error occurs
      */
      public void configure( Configuration config ) throws ConfigurationException
      {
          getLogger().info( "configuration stage" );
          m_source = config.getChild( "source" ).getValue( "unknown" );
      }
  
     /**
      * Initialization of the component by the container.
      * @exception Exception if an initialization error occurs
      */
      public void initialize() throws Exception
      {
          getLogger().info( "initialization stage" );
          final String message = 
            "source: " + m_source;
          getLogger().info( message );
      }
  }
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/block/src/java/tutorial/HelloComponent.xconfig
  
  Index: HelloComponent.xconfig
  ===================================================================
  <?xml version="1.0"?>
  
  <!--
  This is an example of a configuration packaged with a component
  type.  Configuration declarations of this kind are normally used
  to establish default configuration values required by an 
  implementation.  The Merlin container will use this information
  to construct a cascading configuration where this configuration
  is placed as the configuration of last resort.
  -->
  
  <configuration>
    <source>packaged default</source>
  </configuration>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/defaults/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  maven.log
  velocity.log
  build.properties
  target
  logs
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/defaults/README.TXT
  
  Index: README.TXT
  ===================================================================
  
  Configuration Management
  ------------------------
  
  This tutorial covers default configuration using the <classname>.xconfig resource.
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/defaults/maven.xml
  
  Index: maven.xml
  ===================================================================
  <project default="java:jar" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util">
  
    <preGoal name="java:compile">
      <attainGoal name="merlin:meta"/>
    </preGoal>
  
  </project>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/defaults/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <project>
  
    <groupId>merlin</groupId>
    <id>merlin-tutorial-configuration</id>
    <name>Merlin Configuration Tutorial</name>
    <package>tutorial</package>
  
    <currentVersion>1.0</currentVersion>
    <inceptionYear>2003</inceptionYear>
    <shortDescription>Merlin Configuration Tutorial.</shortDescription>
  
    <dependencies>
      <dependency>
        <groupId>avalon</groupId>
        <artifactId>avalon-framework</artifactId>
        <version>4.1.4</version>
      </dependency>
    </dependencies>
    
    <build>
  
      <sourceDirectory>${basedir}/src/java</sourceDirectory>
  
      <resources>
        <resource>
          <directory>${maven.conf.dir}</directory>
          <targetPath>BLOCK-INF</targetPath>
          <includes>
            <include>block.xml</include>
          </includes>
        </resource>
        <resource>
          <directory>${maven.src.dir}/java</directory>
          <includes>
            <include>**/*.x*</include>
          </includes>
        </resource>
      </resources>
  
      <jars></jars>
  
    </build>
  
  </project>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/defaults/conf/block.xml
  
  Index: block.xml
  ===================================================================
  
  <block>
  
     <info>
       <name>tutorial</name>
     </info>
  
     <implementation>
       <component name="hello" class="tutorial.HelloComponent" activation="startup" />
    </implementation>
  
  </block>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/defaults/src/java/tutorial/HelloComponent.java
  
  Index: HelloComponent.java
  ===================================================================
  
  package tutorial;
  
  import org.apache.avalon.framework.logger.AbstractLogEnabled;
  import org.apache.avalon.framework.activity.Initializable;
  import org.apache.avalon.framework.configuration.Configurable;
  import org.apache.avalon.framework.configuration.Configuration;
  import org.apache.avalon.framework.configuration.ConfigurationException;
  
  /**
   * A configurable component.
   *
   * @avalon.meta.version 1.0
   * @avalon.meta.name simple
   */
  public class HelloComponent extends AbstractLogEnabled 
    implements Configurable, Initializable
  {
      private String m_source = "undefined";
  
     /**
      * Configuration of the component by the container.  The 
      * implementation get a child element named 'source' and 
      * assigns the value of the element to a local variable.
      *
      * @param config the component configuration
      * @exception ConfigurationException if a configuration error occurs
      */
      public void configure( Configuration config ) throws ConfigurationException
      {
          getLogger().info( "configuration stage" );
          m_source = config.getChild( "source" ).getValue( "unknown" );
      }
  
     /**
      * Initialization of the component by the container.
      * @exception Exception if an initialization error occurs
      */
      public void initialize() throws Exception
      {
          getLogger().info( "initialization stage" );
          final String message = 
            "source: " + m_source;
          getLogger().info( message );
      }
  }
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/defaults/src/java/tutorial/HelloComponent.xconfig
  
  Index: HelloComponent.xconfig
  ===================================================================
  <?xml version="1.0"?>
  
  <!--
  This is an example of a configuration packaged with a component
  type.  Configuration declarations of this kind are normally used
  to establish default configuration values required by an 
  implementation.  The Merlin container will use this information
  to construct a cascading configuration where this configuration
  is placed as the configuration of last resort.
  -->
  
  <configuration>
    <source>packaged default</source>
  </configuration>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/override/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  maven.log
  velocity.log
  build.properties
  target
  logs
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/override/README.TXT
  
  Index: README.TXT
  ===================================================================
  
  Configuration Management
  ------------------------
  
  This tutorial covers the declaration of an explicit configuration target that overrides
block configuration directives.
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/override/maven.xml
  
  Index: maven.xml
  ===================================================================
  <project default="java:jar" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util">
  
    <preGoal name="java:compile">
      <attainGoal name="merlin:meta"/>
    </preGoal>
  
  </project>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/override/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <project>
  
    <groupId>merlin</groupId>
    <id>merlin-tutorial-configuration</id>
    <name>Merlin Configuration Tutorial</name>
    <package>tutorial</package>
  
    <currentVersion>1.0</currentVersion>
    <inceptionYear>2003</inceptionYear>
    <shortDescription>Merlin Configuration Tutorial.</shortDescription>
  
    <dependencies>
      <dependency>
        <groupId>avalon</groupId>
        <artifactId>avalon-framework</artifactId>
        <version>4.1.4</version>
      </dependency>
    </dependencies>
    
    <build>
  
      <sourceDirectory>${basedir}/src/java</sourceDirectory>
  
      <resources>
        <resource>
          <directory>${maven.conf.dir}</directory>
          <targetPath>BLOCK-INF</targetPath>
          <includes>
            <include>block.xml</include>
          </includes>
        </resource>
        <resource>
          <directory>${maven.src.dir}/java</directory>
          <includes>
            <include>**/*.x*</include>
          </includes>
        </resource>
      </resources>
  
      <jars></jars>
  
    </build>
  
  </project>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/override/conf/block.xml
  
  Index: block.xml
  ===================================================================
  
  <block>
  
     <info>
       <name>tutorial</name>
     </info>
  
     <implementation>
       <component name="hello" class="tutorial.HelloComponent" activation="startup">
         <configuration>
           <source>explicit configuration within block</source>
         </configuration>
       </component>
     </implementation>
  
  </block>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/override/conf/config.xml
  
  Index: config.xml
  ===================================================================
  
  <targets>
    <target path="/hello">
      <configuration>
        <source>External configuration target.</source>
      </configuration>
    </target>
  </targets>
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/override/src/java/tutorial/HelloComponent.java
  
  Index: HelloComponent.java
  ===================================================================
  
  package tutorial;
  
  import org.apache.avalon.framework.logger.AbstractLogEnabled;
  import org.apache.avalon.framework.activity.Initializable;
  import org.apache.avalon.framework.configuration.Configurable;
  import org.apache.avalon.framework.configuration.Configuration;
  import org.apache.avalon.framework.configuration.ConfigurationException;
  
  /**
   * A configurable component.
   *
   * @avalon.meta.version 1.0
   * @avalon.meta.name simple
   */
  public class HelloComponent extends AbstractLogEnabled 
    implements Configurable, Initializable
  {
      private String m_source = "undefined";
  
     /**
      * Configuration of the component by the container.  The 
      * implementation get a child element named 'source' and 
      * assigns the value of the element to a local variable.
      *
      * @param config the component configuration
      * @exception ConfigurationException if a configuration error occurs
      */
      public void configure( Configuration config ) throws ConfigurationException
      {
          getLogger().info( "configuration stage" );
          m_source = config.getChild( "source" ).getValue( "unknown" );
      }
  
     /**
      * Initialization of the component by the container.
      * @exception Exception if an initialization error occurs
      */
      public void initialize() throws Exception
      {
          getLogger().info( "initialization stage" );
          final String message = 
            "source: " + m_source;
          getLogger().info( message );
      }
  }
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/override/src/java/tutorial/HelloComponent.xconfig
  
  Index: HelloComponent.xconfig
  ===================================================================
  <?xml version="1.0"?>
  
  <!--
  This is an example of a configuration packaged with a component
  type.  Configuration declarations of this kind are normally used
  to establish default configuration values required by an 
  implementation.  The Merlin container will use this information
  to construct a cascading configuration where this configuration
  is placed as the configuration of last resort.
  -->
  
  <configuration>
    <source>packaged default</source>
  </configuration>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/simple/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  maven.log
  velocity.log
  build.properties
  target
  logs
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/simple/README.TXT
  
  Index: README.TXT
  ===================================================================
  
  Configuration Management
  ------------------------
  
  This tutorial covers the configuration series including usage of the Confiurable interface,
creating default configurations, declarating a configuration directive, and overriding configurations.
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/simple/maven.xml
  
  Index: maven.xml
  ===================================================================
  <project default="java:jar" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util">
  
    <preGoal name="java:compile">
      <attainGoal name="merlin:meta"/>
    </preGoal>
  
  </project>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/simple/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <project>
  
    <groupId>merlin</groupId>
    <id>merlin-tutorial-configuration</id>
    <name>Merlin Configuration Tutorial</name>
    <package>tutorial</package>
  
    <currentVersion>1.0</currentVersion>
    <inceptionYear>2003</inceptionYear>
    <shortDescription>Merlin Configuration Tutorial.</shortDescription>
  
    <dependencies>
      <dependency>
        <groupId>avalon</groupId>
        <artifactId>avalon-framework</artifactId>
        <version>4.1.4</version>
      </dependency>
    </dependencies>
    
    <build>
  
      <sourceDirectory>${basedir}/src/java</sourceDirectory>
  
      <resources>
        <resource>
          <directory>${maven.conf.dir}</directory>
          <targetPath>BLOCK-INF</targetPath>
          <includes>
            <include>block.xml</include>
          </includes>
        </resource>
        <resource>
          <directory>${maven.src.dir}/java</directory>
          <includes>
            <include>**/*.x*</include>
          </includes>
        </resource>
      </resources>
  
      <jars></jars>
  
    </build>
  
  </project>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/configuration/simple/src/java/tutorial/HelloComponent.java
  
  Index: HelloComponent.java
  ===================================================================
  
  package tutorial;
  
  import org.apache.avalon.framework.logger.AbstractLogEnabled;
  import org.apache.avalon.framework.activity.Initializable;
  import org.apache.avalon.framework.configuration.Configurable;
  import org.apache.avalon.framework.configuration.Configuration;
  import org.apache.avalon.framework.configuration.ConfigurationException;
  
  /**
   * A configurable component.
   *
   * @avalon.meta.version 1.0
   * @avalon.meta.name simple
   */
  public class HelloComponent extends AbstractLogEnabled 
    implements Configurable, Initializable
  {
      private String m_source = "undefined";
  
     /**
      * Configuration of the component by the container.  The 
      * implementation get a child element named 'source' and 
      * assigns the value of the element to a local variable.
      *
      * @param config the component configuration
      * @exception ConfigurationException if a configuration error occurs
      */
      public void configure( Configuration config ) throws ConfigurationException
      {
          getLogger().info( "configuration stage" );
          m_source = config.getChild( "source" ).getValue( "unknown" );
      }
  
     /**
      * Initialization of the component by the container.
      * @exception Exception if an initialization error occurs
      */
      public void initialize() throws Exception
      {
          getLogger().info( "initialization stage" );
          final String message = 
            "source: " + m_source;
          getLogger().info( message );
      }
  }
  
  
  

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


Mime
View raw message