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/context_standard/src/java/tutorial HelloComponent.java
Date Mon, 18 Aug 2003 17:45:02 GMT
mcconnell    2003/08/18 10:45:02

  Modified:    merlin/merlin-platform/tutorials/context_standard/src/java/tutorial
                        HelloComponent.java
  Added:       merlin/merlin-platform/tutorials/context_standard .cvsignore
                        README.TXT maven.xml project.xml
               merlin/merlin-platform/tutorials/context_standard/conf
                        block.xml
  Removed:     merlin/merlin-platform/tutorials/context_standard build.xml
               merlin/merlin-platform/tutorials/context_standard/src/config
                        block.xml
  Log:
  Migrate from ant to maven.
  
  Revision  Changes    Path
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/context_standard/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  maven.log
  velocity.log
  build
  target
  tutorial.jar
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/context_standard/README.TXT
  
  Index: README.TXT
  ===================================================================
  
  Typesafe context casting
  ------------------------
  
  This tutorial covers usage of standard context entries.
  
  $ maven
  $ merlin -execute target\classes
  
  [INFO   ] (tutorial.hello): standard context entries
    name: hello
    home: [your-directory]\home\tutorial\hello
    temp: C:\TEMP\tutorial\hello
    partition: /tutorial/
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/context_standard/maven.xml
  
  Index: maven.xml
  ===================================================================
  <project default="jar:jar" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util">
  
    <preGoal name="java:compile">
      <attainGoal name="avalon:meta"/>
    </preGoal>
  
  </project>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/context_standard/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <project>
  
    <groupId>merlin</groupId>
    <id>merlin-tutorial-context-standard</id>
    <name>Merlin Context Standard Tutorial</name>
    <package>tutorial</package>
  
    <currentVersion>1.0</currentVersion>
    <inceptionYear>2003</inceptionYear>
    <shortDescription>Merlin Context Standard Tutorial.</shortDescription>
  
    <dependencies>
      <dependency>
        <groupId>avalon-framework</groupId>
        <artifactId>avalon-framework-api</artifactId>
        <version>SNAPSHOT</version>
      </dependency>
      <dependency>
        <groupId>avalon-framework</groupId>
        <artifactId>avalon-framework-impl</artifactId>
        <version>SNAPSHOT</version>
      </dependency>
    </dependencies>
    
    <build>
  
      <sourceDirectory>${basedir}/src/java</sourceDirectory>
  
      <resources>
        <resource>
          <directory>${basedir}/conf</directory>
          <targetPath>BLOCK-INF</targetPath>
          <includes>
            <include>block.xml</include>
          </includes>
        </resource>
      </resources>
  
      <jars></jars>
  
    </build>
  
  </project>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/tutorials/context_standard/conf/block.xml
  
  Index: block.xml
  ===================================================================
  
  <container name="tutorial">
  
       <component name="hello" class="tutorial.HelloComponent"/>
  
  </container>
  
  
  
  1.3       +10 -0     avalon-sandbox/merlin/merlin-platform/tutorials/context_standard/src/java/tutorial/HelloComponent.java
  
  Index: HelloComponent.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/tutorials/context_standard/src/java/tutorial/HelloComponent.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HelloComponent.java	18 Aug 2003 17:02:37 -0000	1.2
  +++ HelloComponent.java	18 Aug 2003 17:45:02 -0000	1.3
  @@ -8,6 +8,10 @@
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
   
  +/**
  + * Component demonstrating access to standard context entries.
  + * @avalon.component name="demo"
  + */
   public class HelloComponent extends AbstractLogEnabled 
     implements Contextualizable
   {
  @@ -22,6 +26,12 @@
       * The context supplied by the container holds the 
       * Merlin standard context entries for the home and 
       * working directories, component name and partition.
  +    *
  +    * @avalon.context
  +    * @avalon.entry key="urn:avalon:name" type="java.lang.String"
  +    * @avalon.entry key="urn:avalon:partition" type="java.lang.String"
  +    * @avalon.entry key="urn:avalon:home" type="java.io.File"
  +    * @avalon.entry key="urn:avalon:temp" type="java.io.File"
       */
       public void contextualize( Context context )
         throws ContextException
  
  
  

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


Mime
View raw message