mcconnell 2002/08/19 16:05:07
Modified: assembly build.xml
assembly/demo/james james.xml
assembly/demo/lib cornerstone.jar
assembly/demo/src/java/org/apache/excalibur/playground
BasicComponent.java
assembly/src/etc kernel.xml
assembly/src/java/org/apache/excalibur/merlin/kernel
DefaultKernel.java
assembly/src/java/org/apache/excalibur/merlin/model
LibraryDescriptor.java
assembly/src/java/org/apache/excalibur/merlin/model/builder
XMLContainerCreator.java XMLContainerUtil.java
assembly/src/xdocs assembly.xml classpath.xml extensions.xml
Log:
Improvements to the meta-data model dealing with libraries of jar files.
Revision Changes Path
1.44 +15 -9 jakarta-avalon-excalibur/assembly/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/build.xml,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- build.xml 16 Aug 2002 05:16:32 -0000 1.43
+++ build.xml 19 Aug 2002 23:05:05 -0000 1.44
@@ -62,6 +62,9 @@
<fileset dir="${lib}">
<include name="*.jar" />
</fileset>
+ <fileset dir="${lib}/xdoclet">
+ <include name="*.jar" />
+ </fileset>
</path>
<!-- MAIN TARGETS -->
@@ -153,6 +156,7 @@
<srcfiles dir="${src.dir}">
<include name="**/meta/**/*.*"/>
<include name="etc/meta.mf"/>
+ <include name="etc/xdoclet.xml"/>
</srcfiles>
</uptodate>
</target>
@@ -173,8 +177,16 @@
<include name="**/meta/**/*.xml"/>
<include name="**/meta/**/*.properties"/>
<include name="**/meta/**/*.dtd"/>
+ <include name="**/meta/**/*.xdt"/>
+ </fileset>
+ </copy>
+ <mkdir dir="${build}/meta/META-INF"/>
+ <copy todir="${build}/meta/META-INF">
+ <fileset dir="${src.dir}/etc">
+ <include name="xdoclet.xml"/>
</fileset>
</copy>
+
<jar jarfile="${dist.dir}/${meta.jar}"
basedir="${build}/meta" manifest="${etc}/meta.mf"/>
</target>
@@ -305,16 +317,10 @@
</copy>
</target>
- <target name="kernel" depends="deploy">
- <java jar="${extensions}/${merlin.jar}" fork="true">
- <arg value="${src.dir}/etc/kernel.xml"/>
- </java>
- </target>
-
<target name="patch">
- <replace dir="demo"
- token="org.apache.excalibur.merlin.assembly.resource"
- value="org.apache.excalibur.merlin.resource" >
+ <replace dir="src"
+ token="ExtensionsDescriptor"
+ value="LibraryDescriptor" >
<include name="**/*.*"/>
</replace>
</target>
1.4 +3 -10 jakarta-avalon-excalibur/assembly/demo/james/james.xml
Index: james.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/demo/james/james.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- james.xml 16 Aug 2002 12:31:58 -0000 1.3
+++ james.xml 19 Aug 2002 23:05:06 -0000 1.4
@@ -8,26 +8,19 @@
</target>
</logging>
- <extensions>
- <dirset dir=".">
- <include name="extensions"/>
- </dirset>
- </extensions>
-
<container name="root">
- <categories priority="WARN">
+ <categories priority="INFO">
<category priority="ERROR" name="kernel" />
<category priority="ERROR" name="loader" />
</categories>
<classpath>
- <fileset dir="dist">
- <include name="tools.jar"/>
+ <fileset dir="../../jakarta-avalon-cornerstone">
+ <include name="build/lib/cornerstone.jar"/>
</fileset>
<fileset dir="demo/lib">
<include name="phoenix-client.jar"/>
- <include name="cornerstone.jar"/>
<include name="excalibur-thread-1.0.jar"/>
<include name="excalibur-pool-1.0.jar"/>
<include name="excalibur-io-1.1.jar"/>
1.3 +111 -127 jakarta-avalon-excalibur/assembly/demo/lib/cornerstone.jar
<<Binary file>>
1.9 +2 -0
jakarta-avalon-excalibur/assembly/demo/src/java/org/apache/excalibur/playground/BasicComponent.java
Index: BasicComponent.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/demo/src/java/org/apache/excalibur/playground/BasicComponent.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- BasicComponent.java 30 Jul 2002 07:03:34 -0000 1.8
+++ BasicComponent.java 19 Aug 2002 23:05:06 -0000 1.9
@@ -19,6 +19,8 @@
* This is a minimal demonstration component that implements the
* <code>BasicService</code> interface and has no dependencies.
*
+ * @avalon.type lifestyle="singleton" version="1.4"
+ * @avalon.service interface="org.apache.excalibur.playground.BasicService"
shareable="true"
* @author <a href="mailto:[EMAIL PROTECTED]">Stephen McConnell</a>
*/
public class BasicComponent extends AbstractLogEnabled
1.35 +3 -5 jakarta-avalon-excalibur/assembly/src/etc/kernel.xml
Index: kernel.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/etc/kernel.xml,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- kernel.xml 15 Aug 2002 04:14:49 -0000 1.34
+++ kernel.xml 19 Aug 2002 23:05:06 -0000 1.35
@@ -33,11 +33,9 @@
Declaration of installed extension directories and kernel level classpath.
-->
- <extensions>
- <dirset dir=".">
- <include name="extensions"/>
- </dirset>
- </extensions>
+ <library dir=".">
+ <include name="extensions"/>
+ </library>
<classpath>
<fileset dir="dist">
1.40 +2 -2
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/kernel/DefaultKernel.java
Index: DefaultKernel.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/kernel/DefaultKernel.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- DefaultKernel.java 18 Aug 2002 04:20:09 -0000 1.39
+++ DefaultKernel.java 19 Aug 2002 23:05:06 -0000 1.40
@@ -371,7 +371,7 @@
//
LibraryDescriptor extensions =
- m_creator.createLibraryDescriptor( m_config.getChild("library") );
+ m_creator.createLibraryDescriptor( m_config.getChild("library", false
) );
ClasspathDescriptor classpath =
m_creator.createClasspathDescriptor( m_config.getChild("classpath") );
1.2 +11 -1
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/LibraryDescriptor.java
Index: LibraryDescriptor.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/LibraryDescriptor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LibraryDescriptor.java 18 Aug 2002 04:12:02 -0000 1.1
+++ LibraryDescriptor.java 19 Aug 2002 23:05:06 -0000 1.2
@@ -33,6 +33,16 @@
*
* @param dirs the set of dirsets to include in the classpath
*/
+ public LibraryDescriptor( )
+ {
+ super( ".", new IncludeDescriptor[0] );
+ }
+
+ /**
+ * Create a LibraryDescriptor instance.
+ *
+ * @param dirs the set of dirsets to include in the classpath
+ */
public LibraryDescriptor( final String base, final IncludeDescriptor[] includes
)
{
super( base, includes );
1.11 +5 -1
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLContainerCreator.java
Index: XMLContainerCreator.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLContainerCreator.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- XMLContainerCreator.java 18 Aug 2002 04:12:02 -0000 1.10
+++ XMLContainerCreator.java 19 Aug 2002 23:05:06 -0000 1.11
@@ -245,6 +245,10 @@
public LibraryDescriptor createLibraryDescriptor( Configuration config )
throws ConfigurationException
{
+
+ if( config == null )
+ return new LibraryDescriptor();
+
String base = config.getAttribute("dir");
ArrayList list = new ArrayList();
1.5 +4 -1
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLContainerUtil.java
Index: XMLContainerUtil.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLContainerUtil.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XMLContainerUtil.java 18 Aug 2002 04:12:02 -0000 1.4
+++ XMLContainerUtil.java 19 Aug 2002 23:05:06 -0000 1.5
@@ -128,6 +128,9 @@
public LibraryDescriptor createLibraryDescriptor( Configuration config )
throws ConfigurationException
{
+ if( config == null )
+ return new LibraryDescriptor();
+
String base = config.getAttribute("dir");
ArrayList list = new ArrayList();
1.6 +3 -7 jakarta-avalon-excalibur/assembly/src/xdocs/assembly.xml
Index: assembly.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/xdocs/assembly.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- assembly.xml 14 Aug 2002 11:13:20 -0000 1.5
+++ assembly.xml 19 Aug 2002 23:05:07 -0000 1.6
@@ -254,14 +254,10 @@
<font color="gray"><i><!--
If a component type declares an extension, the component implementation
- MUST implement the <a
href="api/assembly/org/apache/excalibur/merlin/assembly/resource/Extension.html">Extension</a>
interface.
- Possible stage attributes values include CREATE, DESTROY, ACCESS, RELEASE,
- INNER, OUTER and ALL. The INNER attribute value is equivalent to both
- ACCESS and RELEASE. The OUTER attribute value is equivalent to CREATE and
- DESTORY. The ALL value is equivalent to both INNER and OUTER.
+ MUST implement either the <a
href="api/assembly/org/apache/excalibur/merlin/assembly/resource/Creator.html">Creator</a>
or <a
href="api/assembly/org/apache/excalibur/merlin/assembly/resource/Accessor.html">Creator</a>
interfaces.
--></i></font>
- <extension stage="ALL">
+ <extension>
<reference type="<font
color="darkred">org.apache.excalibur.playground.DemoExtension</font>"/>
<attributes>
<attribute key="<font color="darkred">status</font>" value="<font
color="darkred">experimental</font>"/>
1.3 +6 -8 jakarta-avalon-excalibur/assembly/src/xdocs/classpath.xml
Index: classpath.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/xdocs/classpath.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- classpath.xml 6 Aug 2002 07:32:23 -0000 1.2
+++ classpath.xml 19 Aug 2002 23:05:07 -0000 1.3
@@ -10,7 +10,7 @@
<p>Merlin provides two structures supporting the deinition of the class
available with the kernel and containers.</p>
<ul>
- <li><a href="#extensions">Extensions</a> - declaration of a set of extension
directories in which extension jar files are located</li>
+ <li><a href="#extensions">Library</a> - declaration of a set of extension
directories in which extension jar files are located</li>
<li><a href="#classpath">Classpath</a> - declaration of classpath strcutures
that may be included within kernel or container scope.</li>
</ul>
@@ -28,12 +28,10 @@
--></i></font></p>
<pre>
- <extensions">
- <dirset dir="<font color="darkred">.</font>">
- <include name="<font color="darkred">dist</font>"/>
- <include name="<font color="darkred">lib</font>"/>
- </dirset>
- </extensions">
+ <ibrary dir="<font color="darkred">.</font>">
+ <include name="<font color="darkred">dist</font>"/>
+ <include name="<font color="darkred">lib</font>"/>
+ </ibrary">
</pre>
<p><font color="gray"><i><!--
1.4 +7 -11 jakarta-avalon-excalibur/assembly/src/xdocs/extensions.xml
Index: extensions.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/xdocs/extensions.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- extensions.xml 14 Aug 2002 11:35:35 -0000 1.3
+++ extensions.xml 19 Aug 2002 23:05:07 -0000 1.4
@@ -8,7 +8,7 @@
<body>
<section name="Lifecycle Extensions">
-<p>Merlin provides support for pluggable lifecycle extensions. Components can
declare dependencies on a lifecycle extension provider under the component type
declaration using the <phases/> element. Component can declare themselves as
providers of lifecycle extension services via the <extensions/> element.</p>
+<p>Merlin provides support for pluggable lifestyle extensions. Components can
declare dependencies on a lifecycle extension provider under the component type
declaration using the <phases/> element. Component can declare themselves as
providers of lifecycle extension services via the <extensions/> element.</p>
<p>The following XML type declaration depicts a component that declares a
dependency on two lifecycle phase extensions (Securable and Persistable) and in
addition, declares itself as a provider of lifecycle extension handling for the phase
interface DemoExtension.</p>
@@ -47,20 +47,16 @@
<extensions>
<font color="gray"><i><!--
- If a component type declares an extension, the component implementation
- MUST implement the <a
href="api/assembly/org/apache/excalibur/merlin/assembly/resource/Extension.html">Extension</a>
interface.
- Possible stage attributes values include CREATE, DESTROY, ACCESS, RELEASE,
- INNER, OUTER and ALL. The INNER attribute value is equivalent to both
- ACCESS and RELEASE. The OUTER attribute value is equivalent to CREATE and
- DESTORY. The ALL value is equivalent to both INNER and OUTER.
+ Declaration of extension handling ability. The reference element
+ declares the lifestyle interface that the extension supports and is
+ used by a container when resolving <stage/> depedencies.
--></i></font>
- <extension stage="ALL">
+ <extension>
<reference type="<font
color="darkred">org.apache.excalibur.playground.DemoExtension</font>"/>
<attributes>
<attribute key="<font color="darkred">status</font>" value="<font
color="darkred">experimental</font>"/>
- </attributes>
-
+ </attributes>
</extension>
</extensions>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>