avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: avalon-excalibur/lifecycle/src/xdocs extension.xml fortress.xml index.xml interfaces.xml merlin.xml
Date Tue, 11 Mar 2003 15:53:56 GMT
bloritsch    2003/03/11 07:53:56

  Modified:    lifecycle build.xml default.properties
               lifecycle/src/xdocs extension.xml fortress.xml index.xml
                        interfaces.xml merlin.xml
  Removed:     lifecycle WARNING.txt
  Log:
  update docs to build with Forrest
  
  Revision  Changes    Path
  1.2       +193 -92   avalon-excalibur/lifecycle/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/lifecycle/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xml	11 Mar 2003 13:31:33 -0000	1.1
  +++ build.xml	11 Mar 2003 15:53:56 -0000	1.2
  @@ -1,6 +1,6 @@
   <?xml version="1.0"?>
   
  -<project name="Avalon Lifecycle Extension" default="install" basedir=".">
  +<project name="Excalibur Instrument" default="main" basedir=".">
   
       <property file="${user.home}/build.properties"/>
       <property file="${basedir}/../ant.properties"/>
  @@ -11,15 +11,20 @@
   
       <!-- Classpath for product -->
       <path id="project.class.path">
  -        <pathelement location="${avalon-framework.jar}"/>
           <pathelement location="${build.classes}"/>
           <pathelement location="${checkstyle.jar}"/>
  +
  +        <!-- Optional jars -->
  +        <pathelement location="${avalon-framework.jar}"/>
  +
           <pathelement path="${java.class.path}"/>
       </path>
   
       <path id="tools.class.path">
           <pathelement location="${junit.jar}"/>
  -        <fileset dir="${jakarta-site.dir}/lib"/>
  +        <pathelement location="${tools.jar}"/>
  +        <fileset dir="${tools.dir}/lib"/>
  +        <fileset dir="${tools.dir}/ext"/>
       </path>
   
       <path id="test.class.path">
  @@ -29,36 +34,42 @@
       </path>
       <property name="cp" refid="test.class.path"/>
   
  -    <target name="main" depends="context,jar" description="Build the project"/>
  +    <target name="main" depends="jar" description="Build the project"/>
       <target name="rebuild" depends="clean,main" description="Rebuild the project"/>
   
  -    <target name="context" depends="dependencies">
  -      <uptodate property="uptodate" targetfile="${build.lib}/${jar.name}">
  -        <srcfiles dir="src">
  -          <include name="**/*.*"/>
  -        </srcfiles>
  -      </uptodate>
  -    </target>
  -
  -    <target name="flags">
  -        <available property="framework.present"
  -               classname="org.apache.avalon.framework.Version"
  -               classpathref="project.class.path" />
  -    </target>
  -
  -    <target name="dependencies" depends="flags" unless="framework.present">
  -      <echo>Framework not present - downloading from: ${remote.repository}</echo>
  -      <mkdir dir="${local.repository}"/>
  -	<get src="${remote.repository}/${avalon-framework.id}/jars/${avalon-framework.name}"
  -		dest="${local.repository}/${avalon-framework.name}"
  -		verbose="true"
  -		usetimestamp="true"/>
  +    <!-- Checks the environment for existing resources -->
  +    <target name="check-environment">
  +        <available property="framework.present" classname="org.apache.avalon.framework.logger.AbstractLogEnabled">
  +            <classpath refid="project.class.path"/>
  +        </available>
  +    </target>
  +
  +    <target name="framework-warning" unless="framework.present">
  +        <echo>****************************************************</echo>
  +        <echo>* avalon-framework.jar not found                    </echo>
  +        <echo>*                                                   </echo>
  +        <echo>* Framework was not available so the jar file       </echo>
  +        <echo>* created by this build will not include the class: </echo>
  +        <echo>*  AbstractLogEnabledInstrumentable                 </echo>
  +        <echo>****************************************************</echo>
  +    </target>
  +
  +    <target name="dependencies" description="Check dependencies" unless="skip.dependencies">
  +        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkCommon"/>
  +        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkFramework"/>
  +    </target>
  +
  +    <target name="dependencies-test" depends="dist-jar, dependencies"
  +        description="Check unit test dependencies" unless="skip.dependencies">
  +        <!-- Need the jar to prevent recursive deps. -->
  +
  +        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkJUnit"/>
       </target>
   
       <!-- Compiles the source code -->
  -    <target name="compile" depends="context,dependencies" description="Compiles the
source code" unless="uptodate">
  +    <target name="compile" depends="dependencies, check-environment, framework-warning"
  +        description="Compiles the source code">
   
  -        <echo message="building ${ant.project.name}"/>
           <mkdir dir="${build.classes}"/>
   
           <!-- Compile all classes excluding the tests. -->
  @@ -70,6 +81,8 @@
               target="1.2">
               <classpath refid="project.class.path" />
               <include name="**/*.java"/>
  +            <exclude name="org/apache/excalibur/instrument/AbstractLogEnabledInstrumentable.java"
  +                     unless="framework.present"/>
           </javac>
   
           <!-- copy resources to same location as .class files -->
  @@ -79,13 +92,15 @@
                   <exclude name="**/package.html"/>
               </fileset>
           </copy>
  -
       </target>
   
       <!-- Compiles the unit test source code -->
  -    <target name="compile-test" depends="compile" description="Compiles the source code">
  +    <target name="compile-test" depends="compile, dependencies-test" description="Compiles
the source code">
           <mkdir dir="${build.testsrc}"/>
   
  +        <!-- In case tests do not exist, create the directory -->
  +        <mkdir dir="${test.dir}"/>
  +
           <!-- Copy over all of the tests applying test filters -->
           <copy todir="${build.testsrc}">
               <fileset dir="${test.dir}"/>
  @@ -100,17 +115,18 @@
               optimize="${build.optimize}"
               deprecation="${build.deprecation}"
               target="1.2">
  -            <classpath refid="test.class.path" />
  +            <classpath>
  +              <path refid="test.class.path" />
  +              <pathelement path="${build.classes}"/>
  +            </classpath>
               <include name="**/*.java"/>
           </javac>
   
           <copy todir="${build.testclasses}">
               <fileset dir="${test.dir}">
                   <exclude name="**/*.java"/>
  -                <exclude name="**/package.html"/>
               </fileset>
           </copy>
  -
       </target>
   
       <!-- Copies and filters the license. Used by jar and dist -->
  @@ -122,18 +138,25 @@
                   <filter token="year" value="${year}"/>
               </filterset>
           </copy>
  +
       </target>
   
       <!-- Creates all the .jar file -->
  -    <target name="jar" depends="compile, prepare-conf" description="Generates the jar
files" unless="uptodate">
  +    <target name="jar" depends="compile, prepare-conf" description="Generates the jar
files">
   
           <mkdir dir="${build.lib}"/>
   
           <jar jarfile="${build.lib}/${jar.name}"
               basedir="${build.classes}"
  -            compress="${build.compress}"
  -            manifest="${src.dir}/etc/project.mf">
  -
  +            compress="${build.compress}">
  +            <manifest>
  +              <attribute name="Extension-Name" value="${name}"/>
  +              <attribute name="Specification-Vendor" value="Apache Software Foundation"/>
  +              <attribute name="Specification-Version" value="1.0"/>
  +              <attribute name="Implementation-Vendor" value="Apache Software Foundation"/>
  +              <attribute name="Implementation-Vendor-Id" value="ASF"/>
  +              <attribute name="Implementation-Version" value="${package-version}"/>
  +            </manifest>
               <exclude name="**/test/**"/>
               <zipfileset dir="${build.conf}" prefix="META-INF/">
                   <include name="LICENSE.txt"/>
  @@ -141,19 +164,17 @@
           </jar>
       </target>
   
  -    <target name="install" depends="jar">
  -      <mkdir dir="${local.repository}"/>
  -      <copy toDir="${local.repository}" file="${build.dir}/lib/${jar.name}"/>
  -    </target> 
  -
       <!-- Creates all the Javadocs -->
       <target name="javadocs" depends="compile" description="Generates the javadocs" unless="skip.javadocs">
   
  -        <mkdir dir="${build.javadocs}"/>
  +        <mkdir dir="${dist.javadocs}"/>
           <javadoc packagenames="org.apache.*"
               sourcepath="${java.dir}"
  -            destdir="${build.javadocs}">
  -            <classpath refid="project.class.path" />
  +            destdir="${dist.javadocs}">
  +            <classpath>
  +              <path refid="test.class.path" />
  +              <pathelement path="${build.classes}"/>
  +            </classpath>
               <doclet name="com.sun.tools.doclets.standard.Standard">
                   <param name="-author"/>
                   <param name="-version"/>
  @@ -161,11 +182,9 @@
                   <param name="-windowtitle" value="${Name} API"/>
                   <param name="-link" value="http://java.sun.com/j2se/1.4/docs/api/"/>
                   <param name="-link" value="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/"/>
  -                <param name="-link" value="${j2se.api.link}"/>
  -                <param name="-link" value="${j2ee.api.link}"/>
  -                <param name="-link" value="${avalon.api.link}"/>
  +                <param name="-link" value="http://jakarta.apache.org/avalon/api/"/>
                   <param name="-bottom"
  -                    value="&quot;Copyright &#169; ${year} Apache Avalon Project.
All Rights Reserved.&quot;"/>
  +                    value="&quot;Copyright &#169; ${year} Apache Jakarta Project.
All Rights Reserved.&quot;"/>
               </doclet>
           </javadoc>
       </target>
  @@ -197,6 +216,8 @@
   
       <target name="test-reports" depends="test" description="Generate Reports for the
unit tests">
   
  +        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkBSF"/>
  +
           <mkdir dir="${build.reports}/junit"/>
   
           <junitreport todir="${build.reports}/junit">
  @@ -206,55 +227,87 @@
               <report format="frames" todir="${build.reports}/junit"/>
           </junitreport>
   
  -        <!-- Clean up the xml reports used by the junitreport task -->
  -        <!--
  -        <delete>
  -            <fileset dir="${build.tests}" includes="TEST-*.xml"/>
  -            <fileset dir="${build.tests}" includes="TESTS-*.xml"/>
  -        </delete>
  -        -->
  +    </target>
  +
  +    <target name="checkstyle" if="do.checkstyle" description="Checkstyle">
  +
  +        <!-- this invocation of checkstyle requires that checkstyle be downloaded and
setup -->
  +        <!-- thats why you are required to define do.checkstyle property to generate
the report -->
  +        <taskdef name="checkstyle"
  +            classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
  +            <classpath refid="project.class.path"/>
  +        </taskdef>
  +        <checkstyle
  +            lcurlyType="nl"
  +            lcurlyMethod="nl"
  +            lcurlyOther="nl"
  +            rcurly="ignore"
  +            allowProtected="false"
  +            allowPackage="false"
  +            allowNoAuthor="false"
  +            maxLineLen="100"
  +            maxMethodLen="100"
  +            maxConstructorLen="100"
  +            memberPattern="^m_[a-z][a-zA-Z0-9]*$"
  +            staticPattern="^c_[a-z][a-zA-Z0-9]*$"
  +            constPattern="(^c_[a-z][a-zA-Z0-9]*$)|([A-Z_]*$)"
  +            ignoreImportLen="true"
  +            allowTabs="false"
  +            javadocScope="protected"
  +            ignoreWhitespace="true"
  +            cacheFile="checkstyle.cache"
  +            failOnViolation="false"
  +            ignoreCastWhitespace="true">
  +            <fileset dir="${java.dir}">
  +                <include name="**/*.java"/>
  +            </fileset>
  +            <formatter type="plain"/>
  +            <formatter type="xml" toFile="${build.dir}/checkstyle-results.xml"/>
  +        </checkstyle>
  +    </target>
  +
  +    <target name="checkstyle-report"
  +        depends="checkstyle"
  +        if="do.checkstyle"
  +        description="Generate Checkstyle Report">
  +
  +        <mkdir dir="${build.reports}/checkstyle"/>
  +        <property name="checkstyle.pathhack" location="."/>
  +        <style style="${tools.dir}/etc/checkstyle-frames.xsl" in="${build.dir}/checkstyle-results.xml"
  +            out="${build.reports}/checkstyle/delete-me.html"/>
   
       </target>
   
  -  <target name="checkstyle" if="do.checkstyle">
  -    <taskdef classpath="${checkstyle.jar}"
  -       resource="checkstyletask.properties"/>
  -    <mkdir dir="${build.dir}"/>
  -    <checkstyle
  -      properties="${etc.dir}/checkstyle.properties" 
  -      failOnViolation="false">
  -      <fileset dir="${java.dir}"
  -               includes="**/*.java"/>
  -      <property key="checkstyle.cache.file" file="${checkstyle-cache}"/>
  -      <formatter type="plain"/>
  -      <formatter type="xml" toFile="${build.dir}/checkstyle-results.xml"/>
  -    </checkstyle>
  -  </target>
  -
  -  <!-- Creates the distribution -->
  -  <target name="dist"
  -        depends="dist-jar, javadocs"
  -        description="Generates a distribution (jar + javadocs + src )">
  +    <target name="prepare-dist"
  +        depends="test-reports, checkstyle-report, site">
  +
   
           <copy file="${build.conf}/LICENSE.txt" todir="${dist.dir}"/>
           <copy file="../KEYS" todir="${dist.dir}"/>
   
  -        <zip zipfile="${dist.dir}/src.zip" compress="true">
  -            <zipfileset dir="src/java"/>
  -        </zip>
  +        <mkdir dir="${dist.base}"/>
  +    </target>
  +
  +    <!-- Creates the distribution -->
  +    <target name="dist"
  +        depends="dist-jar, test-reports, checkstyle-report, site"
  +        description="Generates a distribution (jar + docs javadocs + unit tests + checkstyle
reports)">
  +
  +        <copy file="${build.conf}/LICENSE.txt" todir="${dist.dir}"/>
  +        <copy file="../KEYS" todir="${dist.dir}"/>
   
  -        <zip zipfile="${dist.dir}/docs.zip" compress="true">
  -            <zipfileset dir="build/docs"/>
  +        <zip zipfile="${dist.dir}/src.zip" compress="false">
  +            <zipfileset dir="src/java"/>
           </zip>
   
           <mkdir dir="${dist.base}"/>
   
           <zip zipfile="${dist.base}/${dist.name}.zip" compress="true">
               <zipfileset dir="${dist.dir}" prefix="${dist.name}"/>
  +            <zipfileset dir="${docs.dir}" prefix="${dist.name}/docs"/>
           </zip>
  -
  -        <delete dir="${dist.dir}" />
  -
  +       
  +	    <checksum file="${dist.base}/${dist.name}.zip" fileext=".md5"/>
       </target>
   
       <!-- Creates a mini jar-only distribution -->
  @@ -271,23 +324,71 @@
       <target name="dist.lite"
           depends="dist-jar, test, javadocs"
           description="Generates a minimal distribution (jar + javadocs)">
  +
           <copy file="../LICENSE.txt" todir="${dist.dir}"/>
           <copy file="../KEYS" todir="${dist.dir}"/>
  +
  +    </target>
  +
  +    <!-- Setup the filters -->
  +    <target name="setup-filters">
  +      <filter token="Name" value="Avalon ${Name}"/>
  +      <filter token="name" value="${dir-name}"/>
  +      <filter token="version" value="${version}"/>
  +      <filter token="year" value="${year}"/>
  +      <filter token="status" value="${status}"/>
  +      <filter token="release" value="${release}"/>
  +      <filter token="short-version" value="${short.version}"/>
  +
  +      <property name="avalon.base" value="http://jakarta.apache.org/avalon"/>
  +      <property name="framework.base" value="http://jakarta.apache.org/avalon/framework"/>
  +      <property name="phoenix.base" value="http://jakarta.apache.org/avalon/phoenix"/>
  +      <property name="cornerstone.base" value="http://jakarta.apache.org/avalon/cornerstone"/>
  +      <property name="logkit.base" value="http://jakarta.apache.org/avalon/logkit"/>
  +      <property name="testlet.base" value="http://jakarta.apache.org/avalon/testlet"/>
  +
  +      <filter token="year" value="${year}"/>
  +      <filter token="AVALON_BASE" value="${avalon.base}"/>
  +      <filter token="FRAMEWORK_BASE" value="${framework.base}"/>
  +      <filter token="PHOENIX_BASE" value="${phoenix.base}"/>
  +      <filter token="CORNERSTONE_BASE" value="${cornerstone.base}"/>
  +      <filter token="LOGKIT_BASE" value="${logkit.base}"/>
  +      <filter token="TESTLET_BASE" value="${testlet.base}"/>
       </target>
   
  -    <target name="docs" depends="xdocs, javadocs" description="generates all the Avalon
documentation"/>
   
  -    <target name="xdocs" description="generates the xdocs-based documentation">
  -      <ant antfile="${basedir}/../cocoonbuild.xml"/>
  +    <!-- Prepares the documentation directory -->
  +    <target name="docs" depends="setup-filters"> <!-- depends="javadocs" description="Generates
the Docs" -->
  +      <mkdir dir="${docs.dir}"/>
  +
  +      <mkdir dir="${build.context}"/>
  +      <mkdir dir="${build.xdocs}"/>
  +      <mkdir dir="${build.docs}"/>
  +      <mkdir dir="${build.dir}/work"/>
  +
  +      <!-- Base pointers for non-xdocs documentation. Override these in .ant.properties
to link to local docs -->
  +      <ant antfile="${basedir}/../forrestbuild.xml"/>
  +
  +      <copy todir="${docs.dir}">
  +        <fileset dir="${build.docs}">
  +          <include name="**"/>
  +        </fileset>
  +      </copy>
  +
  +      <!-- hack for stupid transport on api link -->
  +      <replace file="${docs.dir}/index.html" token="index.html.xml" value="index.html"/>
  +
       </target>
   
       <target name="site" depends="docs" description=" Places Docs ready for hosting on
website">
  -        <mkdir dir="../site/dist/docs/${dir-name}"/>
  -        <copy todir="../site/dist/docs/${dir-name}">
  -            <fileset dir="${build.docs}">
  -                <include name="**"/>
  -            </fileset>
  -        </copy>
  +
  +      <mkdir dir="../site/dist/docs/${dir-name}"/>
  +      <copy todir="../site/dist/docs/${dir-name}">
  +        <fileset dir="${docs.dir}">
  +          <include name="**"/>
  +        </fileset>
  +      </copy>
  +
       </target>
   
       <!-- Cleans up build and distribution directories -->
  @@ -295,9 +396,9 @@
           <delete file="checkstyle.cache"/>
           <delete dir="${build.dir}" />
           <delete dir="${dist.dir}" />
  +        <delete dir="${docs.dir}" />
           <delete dir="test" /> <!-- unit testing output directory -->
           <delete>
  -            <fileset dir="." includes="velocity.*"/>
               <fileset dir="." includes="**/*~" defaultexcludes="no"/>
           </delete>
       </target>
  
  
  
  1.2       +23 -36    avalon-excalibur/lifecycle/default.properties
  
  Index: default.properties
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/lifecycle/default.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- default.properties	11 Mar 2003 13:31:33 -0000	1.1
  +++ default.properties	11 Mar 2003 15:53:56 -0000	1.2
  @@ -5,35 +5,26 @@
   # Overridden by ../default.properties and all ant.properties
   # Not user-editable; use ant.properties files instead
   
  -name=avalon-lifecycle
  -Name=Avalon Containment Lifecycle Extensions
  +name=excalibur-lifecycle
  +Name=Excalibur Lifecycle
   dir-name=lifecycle
   version=1.0
   package-version=1.0
   year=2000-2002
   
  -remote.repository = http://www.osm.net/repository
  -local.repository = ../lib
  -
   # --------------------------------------------------
   #                REQUIRED LIBRARIES
   # --------------------------------------------------
   
   # ----- Avalon Framework, version 4.1 or later -----
  -avalon-framework.id = avalon-framework
  -avalon-framework.version = 4.1.4
  -avalon-framework.name = ${avalon-framework.id}-${avalon-framework.version}.jar
  -avalon-framework.jar=${local.repository}/${avalon-framework.name}
  -
  -# ----- Avalon Sandbox -----
  -avalon-sandbox.home=${basedir}/..
  -
  -# ----- Excalibur -----
  -excalibur.home=${basedir}/../../avalon-excalibur
  +avalon-framework.home=${basedir}/../../avalon
  +avalon-framework.lib=${avalon-framework.home}/target/lib
  +avalon-framework.jar=${avalon-framework.lib}/avalon-framework.jar
   
   
   # --------------------------------------------------
   
  +
   #  Settings used to configure compile environment
   build.debug = on
   build.optimize = off
  @@ -42,50 +33,46 @@
   junit.failonerror = false
   
   #  location of intermediate products
  -build.dir = build
  +build.dir = ${basedir}/build
   build.testsrc = ${build.dir}/testsrc
   build.testclasses = ${build.dir}/testclasses
   build.lib = ${build.dir}/lib
   build.conf = ${build.dir}/conf
   build.classes = ${build.dir}/classes
  +build.client.classes = ${build.dir}/clientclasses
  +build.manager.classes = ${build.dir}/managerclasses
   build.tests = ${build.dir}/tests
   build.reports = ${build.dir}/reports
  -build.docs = ${build.dir}/docs
  -build.javadocs = ${build.docs}/api
   
   #  Set the properties for source directories
  -src.dir = src
  +src.dir = ${basedir}/src
   java.dir = ${src.dir}/java
   conf.dir = ${src.dir}/conf
   test.dir = ${src.dir}/test
  -etc.dir = ${src.dir}/etc
  -
  -#  Set the properties for distribution directories
  -dist.dir = dist
  -dist.javadocs = ${dist.dir}/docs/api
   
  +#  needed by Cocoon
  +build.context = ${build.dir}/documentation
  +build.docs = ${build.dir}/docs
  +build.xdocs = ${build.dir}/xdocs
  +context.dir = ../../avalon/src/documentation
  +tools.dir = ../../avalon/tools
  +tools.jar = ${java.home}/../lib/tools.jar
   xdocs.dir = ${src.dir}/xdocs
   docs.dir = ${dist.dir}/docs
  -jakarta-site.dir = ../../jakarta-site
  +
  +
  +#  Set the properties for distribution directories
  +dist.dir = dist
  +dist.javadocs = ${docs.dir}/api
   
   #  name of .zip/.tar.gz/.bz2 files and their top-level directory
   dist.name = ${name}-${version}
   
   #  name of jar file
  -jar.name = ${name}-${package-version}.jar
  +jar.name = ${name}-${version}.jar
   
   #  property indicating directory where all distribution archives are placed
   dist.base = distributions
   
  -# misc.
  -
  -checkstyle-cache = ${build.dir}/checkstyle.cache
  -
   depchecker.prefix=.
  -
  -# javadoc links
  -doc.root = ../../../../..
  -j2se.api.link = http://java.sun.com/j2se/1.4/docs/api/
  -j2ee.api.link = http://java.sun.com/j2ee/sdk_1.3/techdocs/api/
  -avalon.api.link = ${doc.root}/avalon/docs/api
   
  
  
  
  1.2       +43 -46    avalon-excalibur/lifecycle/src/xdocs/extension.xml
  
  Index: extension.xml
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/lifecycle/src/xdocs/extension.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- extension.xml	11 Mar 2003 13:31:34 -0000	1.1
  +++ extension.xml	11 Mar 2003 15:53:56 -0000	1.2
  @@ -1,4 +1,5 @@
   <?xml version="1.0"?>
  +<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
   
   <document>
     <header>
  @@ -9,7 +10,7 @@
     </header>
     <body>
   
  -  <s1 title="What are lifecycle extensions ?">
  +  <section><title>What are lifecycle extensions ?</title>
      <p>
       Lifecycle extensions are additional stages a component can traverse through during
       it's lifetime. Lifecycle extensions allow a container to provide extra functionality
  @@ -62,11 +63,9 @@
       by the reader.
      </p>
   
  -   <p>
       <note>As at the time of writing, Fortress and Merlin is the only Avalon container
that
       supports lifecycle extensions, which means components that use this feature will not
work
       with the other Avalon containers (ExcaliburComponentManager, Phoenix, Tweety, etc)</note>
  -   </p>
   
      <p>
       Support for lifecycle extensions in the other Avalon containers is technically possible
but
  @@ -74,95 +73,93 @@
       one of these containers and would like to use lifecycle extensions.
      </p>
   
  -  </s1>
  +  </section>
   
  -  <s1 title="How do I extend a Component's lifecycle ?">
  +  <section><title>How do I extend a Component's lifecycle ?</title>
      <p>
       Extending a Component's lifecycle is straightforward. An overview of the process
       follows:
      </p>
   
       <ol>
  -     <li>Define the new component interface</li>
  +	    <li>Define the new component interface
   
  -     <p>
  +		    <br/><br/>
         Create the new interface defining the operations that should be called upon components
         that implement this interface. Using the previously mentioned examples, this would
be
         your <code>SecurityManageable</code>, <code>Cacheable</code>,
<code>Decryptable</code>,
         <code>Recycleable</code> interfaces.
  -     </p>
  +      </li>
   
        <li>Define an extension object that calls upon the methods defined in the new
interface,
  -     during one or more of the pre-defined phases of component's lifecycle</li>
  +	     during one or more of the pre-defined phases of component's lifecycle
   
  -     <p>
  +	     <br/><br/>
         Create a class that implements the <code>Creator</code> and/or <code>Accessor</code>
         interfaces and implemets the interaction with target components supplied under the
         create, destroy, access and relase operations.
  -     </p>
  +      </li>
   
  -     <li>Register your extension object</li>
  +     <li>Register your extension object
   
  -     <p>
  +	     <br/><br/>
          This depends on the container you are using.  In
          Merlin you need to include the &lt;extensions&gt; tag in the component .xinfo
file and
          Merlin will automatically recognize it.  In Fortress you register the extension
object
          with a <code>LifecycleExtensionManager</code>
  -     </p>
  -
  -     <li>Implement the new component interface on your component</li>
  +       </li>
   
  -     <p>
  +     <li>Implement the new component interface on your component
  +	     <br/><br/>
  +	    
         Add the new <code>implements</code> clause to your Component, or Component
implementation,
         and write any methods defined in the implemented interface.
  -     </p>
  +      <br/><br/>
   
  -     <p>
         Proceed as normal. Checking for extensions is done implicitly within both Fortress
and
         Merlin. Once lifecycle extensions are registered they will be activated during the
4
         phases defined later in this document.
  -     </p>
  +      </li>
       </ol>
  -  </s1>
  +  </section>
   
  -  <s1 title="When can a Component's lifecycle be extended ?">
  +  <section><title>When can a Component's lifecycle be extended ?</title>
      <p>
       The life of any component can be broken down to the following phases:
      </p>
   
       <ol>
  -     <li>Creation</li>
  +	    <li>Creation
   
  -     <p>
  +		    <br/><br/>
         When the component is instantiated.
  -     </p>
  +      </li>
   
  -     <li>Access</li>
  +     <li>Access
   
  -     <p>
  +	     <br/><br/>
         When the component is accessed via a ServiceManager/Selector
         (<code>lookup()/select()</code>).
  -     </p>
  +      </li>
   
  -     <li>Release</li>
  +     <li>Release
   
  -     <p>
  +	     <br/><br/>
         When the component is released via a ServiceManager/Selector (<code>release()</code>).
  -     </p>
  +      </li>
   
  -     <li>Destruction</li>
  +     <li>Destruction
   
  -     <p>
  +	     <br/><br/>
         When the component is decommissioned, ready for garbage collection.
  -     </p>
  +      
  +     </li>
   
       </ol>
   
  -   <p>
       <note>A component will go through it's Creation and Destruction phase only once.
Since
       extension classes can implement different handling strategies (Poolable, ThreadSafe,
       etc), the access and release phases of a component can be applied multiple times.</note>
  -   </p>
   
      <p>
       Lifecycle extensions can be added to any of the above defined phases. This allows
  @@ -181,9 +178,9 @@
       to any one context of use.
      </p>
   
  -  </s1>
  +  </section>
   
  -  <s1 title="Lifestyle Extension Interfaces">
  +  <section><title>Lifestyle Extension Interfaces</title>
   
         <p>
         A container manages extensions using an extension handler.  Handlers may implement
  @@ -192,7 +189,7 @@
         accessor extension will be activated during the access and release stages.
         </p>
   
  -      <s2 title="The Creator Interface">
  +      <section><title>The Creator Interface</title>
   
   <p>The <code>Creator</code> interface describes the create and destroy
   stages that occur between a component and a container
  @@ -228,9 +225,9 @@
   
    }
        </source>
  -      </s2>
  +      </section>
   
  -      <s2 title="Accessor Interface">
  +      <section><title>Accessor Interface</title>
   <p>
   The <code>Accessor</code> interface describes the access and release
   stages that occur between a service or component manager and a container
  @@ -266,15 +263,15 @@
   
    }
   </source>
  -   </s2>
  -  </s1>
  +   </section>
  +  </section>
   
  -  <s1 title="Need more information ?">
  +  <section><title>Need more information ?</title>
      <p>
       If you have any particular questions, comments, etc, please send an email to the Avalon
       developer mailing <link href="mailto:dev@avalon.apache.org">list</link>.
      </p>
  -  </s1>
  +  </section>
   
     </body>
     <footer>
  
  
  
  1.2       +12 -13    avalon-excalibur/lifecycle/src/xdocs/fortress.xml
  
  Index: fortress.xml
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/lifecycle/src/xdocs/fortress.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- fortress.xml	11 Mar 2003 13:31:35 -0000	1.1
  +++ fortress.xml	11 Mar 2003 15:53:56 -0000	1.2
  @@ -1,4 +1,5 @@
   <?xml version="1.0"?>
  +<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
   
   <document>
     <header>
  @@ -9,7 +10,7 @@
     </header>
     <body>
   
  -  <s1 title="Example">
  +  <section><title>Example</title>
   
      <p>
       Let's look at a simple example. The following is also available as a working sample
  @@ -21,7 +22,7 @@
       Components. We'll call it the <code>SecurityManageable</code> interface.
      </p>
   
  -  <s2 title="Define the component extension interface">
  +  <section><title>Define the component extension interface</title>
   
      <p>
       First we define the new Component extension interface.
  @@ -44,9 +45,9 @@
      }
      </source>
   
  -  </s2>
  +  </section>
   
  -  <s2 title="Create the lifecycle extensions class">
  +  <section><title>Create the lifecycle extensions class</title>
   
      <p>
       Next we define the actual extension implementation which invokes the <code>secure()</code>
  @@ -84,14 +85,12 @@
      }
      </source>
   
  -   <p>
       <note>An extension class may run components through any given number of
       extensions, and are not limited to just one.</note>
  -   </p>
   
  -  </s2>
  +  </section>
   
  -  <s2 title="Register the lifecycle extensions class">
  +  <section><title>Register the lifecycle extensions class</title>
   
      <p>
       We then inform our container about the extension. This could be done in several different
  @@ -122,9 +121,9 @@
      }
      </source>
   
  -  </s2>
  +  </section>
   
  -  <s2 title="Use the new component interface">
  +  <section><title>Use the new component interface</title>
   
      <p>
       To use the new SecurityManageable lifecycle extension, we simply implement
  @@ -170,9 +169,9 @@
          }
      }
      </source>
  -  </s2>
  +  </section>
   
  -  </s1>
  +  </section>
   
     </body>
     <footer>
  
  
  
  1.2       +4 -3      avalon-excalibur/lifecycle/src/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/lifecycle/src/xdocs/index.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.xml	11 Mar 2003 13:31:35 -0000	1.1
  +++ index.xml	11 Mar 2003 15:53:56 -0000	1.2
  @@ -1,4 +1,5 @@
   <?xml version="1.0"?>
  +<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
   
   <document>
   
  @@ -11,7 +12,7 @@
   
     <body>
   
  -    <s1 title="Introduction">
  +    <section><title>Introduction</title>
   
         <p>The Lifecycle package contains a set of interfaces and classes supporting
portable lifecycle extensions.</p>
   
  @@ -19,7 +20,7 @@
   
         <p>The first step in the container project has been undertaken between the
Fortress and Merlin containers on the subject of lifestyle extension support. The original
design and implementation of lifecycle extensions by Marcus Crafter was implemented using
the Fortress container.  Subsequently, and alternative implementation based on Marcus' design
was introduced using the Merlin container leading to two incompatible solutions aiming at
the same objective.  Through a process of cross-project collaboration, the Fortress and Merlin
developers reached consensus on a common set of APIs and abstract implementation. These resources
constitute the first sub-project of the Excalibur Container package.</p>
   
  -    </s1>
  +    </section>
   
     </body>
   
  
  
  
  1.2       +8 -7      avalon-excalibur/lifecycle/src/xdocs/interfaces.xml
  
  Index: interfaces.xml
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/lifecycle/src/xdocs/interfaces.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- interfaces.xml	11 Mar 2003 13:31:35 -0000	1.1
  +++ interfaces.xml	11 Mar 2003 15:53:56 -0000	1.2
  @@ -1,4 +1,5 @@
   <?xml version="1.0"?>
  +<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
   
   <document>
     <header>
  @@ -9,7 +10,7 @@
     </header>
     <body>
   
  -  <s1 title="Lifestyle Extension Interfaces">
  +  <section><title>Lifestyle Extension Interfaces</title>
   
         <p>
         A container manages extensions using an extension handler.  Handlers may implement
  @@ -18,7 +19,7 @@
         accessor extension will be activated during the access and release stages.
         </p>
   
  -      <s2 title="The Creator Interface">
  +      <section><title>The Creator Interface</title>
   
   <p>The <code>Creator</code> interface describes the create and destroy
   stages that occur between a component and a container
  @@ -54,9 +55,9 @@
   
    }
        </source>
  -      </s2>
  +      </section>
   
  -      <s2 title="Accessor Interface">
  +      <section><title>Accessor Interface</title>
   <p>
   The <code>Accessor</code> interface describes the access and release
   stages that occur between a service or component manager and a container
  @@ -92,8 +93,8 @@
   
    }
   </source>
  -   </s2>
  -  </s1>
  +   </section>
  +  </section>
   
     </body>
     <footer>
  
  
  
  1.2       +16 -15    avalon-excalibur/lifecycle/src/xdocs/merlin.xml
  
  Index: merlin.xml
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/lifecycle/src/xdocs/merlin.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- merlin.xml	11 Mar 2003 13:31:35 -0000	1.1
  +++ merlin.xml	11 Mar 2003 15:53:56 -0000	1.2
  @@ -1,17 +1,18 @@
   <?xml version="1.0"?>
  +<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
   
   <document>
  -  <properties>
  +  <header>
       <title>Lifecycle Extensions</title>
       <authors>
         <person name="Avalon Development Team" email="dev@avalon.apache.org"/>
       </authors>
  -  </properties>
  +  </header>
     <body>
   
  -  <s1 title="Example">
  +  <section><title>Example</title>
   
  -    <s2 title="Create your lifestyle stage interface">
  +    <section><title>Create your lifestyle stage interface</title>
   
   <p>
   The following interface is your domain specific lifecycle stage interface.  It is the interface
that an extension handler will use to interact with your component during deployment and decommissioning.
  @@ -28,9 +29,9 @@
    }
         </source>
   
  -    </s2>
  +    </section>
   
  -    <s2 title="Create the lifestyle extension handler">
  +    <section><title>Create the lifestyle extension handler</title>
   
   <p>
   An extension handler is the implementation class that will be activated by the Merlin container
to handle domain specific tasks during the deployment and decommissioning phases.  The extension
can implement etier or both of the Creator and Accessor interfaces depeding on the particular
extension requirements.  IN this example we are defining a simple creation stage handler that
supplies a message to an instance of Exploitable.
  @@ -86,9 +87,9 @@
   
         </source>
   
  -    </s2>
  +    </section>
   
  -    <s2 title="Create a component implementing the stage interface">
  +    <section><title>Create a component implementing the stage interface</title>
         <source>
    public class MyComponent extends AbstractLogEnabled implements Exploitable
    {
  @@ -124,9 +125,9 @@
   &lt;/type&gt;
   
         </source>
  -    </s2>
  +    </section>
   
  -    <s2 title="Register you component and the extension">
  +    <section><title>Register you component and the extension</title>
   
   <p>To complete the process you need to declare your handler and component in a jar
manifest file.  The following entries show the declaration of the component and the extension
handler.</p>
   
  @@ -141,9 +142,9 @@
     Avalon: Type
         </source>
   
  -    </s2>
  +    </section>
   
  -    <s2 title="Execute the example">
  +    <section><title>Execute the example</title>
   
   <p>To execute the example you simply need to include a reference to you component
within a Merlin container declaration.  The following XML source declares a Merlin kernel,
container, and component.  You don't need to include the handler because Merlin can sort that
out itself based on the information supplied in the meta-info declarations.</p>
   
  @@ -165,9 +166,9 @@
    &lt;/kernel&gt;
         </source>
   
  -    </s2>
  +    </section>
   
  -  </s1>
  +  </section>
   
     </body>
     <footer>
  
  
  

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


Mime
View raw message