mcconnell 2003/03/07 00:39:41
Modified: merlin build.xml default.properties
merlin/src/java/org/apache/avalon/merlin/block/impl
DefaultBlock.java
Log:
Removing redundant content.
Revision Changes Path
1.26 +25 -37 avalon-sandbox/merlin/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/avalon-sandbox/merlin/build.xml,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- build.xml 6 Mar 2003 09:19:26 -0000 1.25
+++ build.xml 7 Mar 2003 08:39:41 -0000 1.26
@@ -32,13 +32,14 @@
<pathelement location="${excalibur-thread.jar}"/>
<pathelement location="${excalibur-threadcontext.jar}"/>
<pathelement location="${excalibur-event.jar}"/>
+ <pathelement location="${avalon-assembly-spi.jar}"/>
<pathelement location="${avalon-assembly.jar}"/>
<pathelement location="${avalon-meta.jar}"/>
<pathelement location="${avalon-lifecycle.jar}"/>
+ <pathelement location="${merlin-spi.jar}"/>
<pathelement location="${merlin-bootstrap.jar}"/>
<pathelement location="${build.classes}"/>
<pathelement location="${checkstyle.jar}"/>
- <!--<pathelement location="${xml-apis.jar}"/>-->
<pathelement path="${java.class.path}"/>
</path>
@@ -53,7 +54,7 @@
<pathelement location="${build.testclasses}"/>
</path>
- <target name="main" depends="jar,jar-playground,deploy" description="Build the
project"/>
+ <target name="main" depends="jar,jar-playground" description="Build the project"/>
<target name="rebuild" depends="clean,main" description="Rebuild the project"/>
<target name="all" depends="rebuild,docs" description="Rebuild the project"/>
@@ -78,6 +79,14 @@
</uptodate>
</target>
+ <target name="spi-context">
+ <uptodate property="spi-uptodate" targetfile="${merlin-spi.jar}">
+ <srcfiles dir="../merlin-spi/src">
+ <include name="**/*.*"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
<target name="bootstrap" depends="bootstrap-context"
description="Bootstrap dependency" unless="bootstrap-uptodate">
<ant dir="../merlin-bootstrap" inheritAll="false"/>
@@ -132,11 +141,14 @@
<available property="bootstrap.present"
classname="${merlin-bootstrap.key}"
classpathref="project.class.path" />
+ <available property="spi.present"
+ classname="${merlin-spi.key}"
+ classpathref="project.class.path" />
</target>
<target name="dependencies" depends="external-dependencies,assembly,bootstrap"
description="Check dependencies"/>
- <target name="external-dependencies"
depends="check-framework,check-i18n,check-configuration,check-extension,check-event,check-excalibur-util-concurrent,check-commons-collections,check-excalibur-collections,check-avalon-logkit,check-thread,check-thread-context,check-pool,check-lifecycle,check-meta,check-assembly,check-bootstrap"/>
+ <target name="external-dependencies"
depends="check-framework,check-i18n,check-configuration,check-extension,check-event,check-excalibur-util-concurrent,check-commons-collections,check-excalibur-collections,check-avalon-logkit,check-thread,check-thread-context,check-pool,check-lifecycle,check-meta,check-assembly,check-bootstrap,check-spi"/>
<target name="check-framework" depends="flags" unless="framework.present">
<mkdir dir="${local.repository}"/>
@@ -266,6 +278,14 @@
usetimestamp="true"/>
</target>
+ <target name="check-spi" depends="flags" unless="spi.present">
+ <mkdir dir="${local.repository}"/>
+ <get src="${merlin-spi.path}"
+ dest="${local.repository}/${merlin-spi.name}"
+ verbose="true"
+ usetimestamp="true"/>
+ </target>
+
<target name="context" depends="dependencies">
<uptodate property="uptodate" targetfile="${build.lib}/${jar.name}">
<srcfiles dir="${src.dir}">
@@ -373,6 +393,7 @@
<copy toDir="${merlin.home}/lib/system" file="${avalon-assembly.jar}"/>
<copy toDir="${merlin.home}/lib/system" file="${merlin.jar}"/>
<copy toDir="${merlin.home}/lib/system" file="${merlin-bootstrap.jar}"/>
+ <copy toDir="${merlin.home}/lib/system" file="${merlin-spi.jar}"/>
<mkdir dir="${merlin.home}/bin"/>
<copy toDir="${merlin.home}/bin">
<fileset dir="${src.dir}/bin">
@@ -409,40 +430,6 @@
</target>
- <target name="deploy" depends="jar">
-
- <mkdir dir="${common.dir}"/>
- <copy todir="${common.dir}" file="${avalon-framework.jar}"/>
- <copy todir="${common.dir}" file="${avalon-meta.jar}"/>
- <copy todir="${common.dir}" file="${excalibur-i18n.jar}"/>
- <copy todir="${common.dir}" file="${avalon-logkit.jar}"/>
- <copy todir="${common.dir}" file="${excalibur-configuration.jar}"/>
-
- <mkdir dir="${lib.dir}"/>
- <copy todir="${lib.dir}" file="${build.lib}/${jar.name}"/>
- <copy todir="${lib.dir}" file="${excalibur-collections.jar}"/>
- <copy todir="${lib.dir}" file="${excalibur-extension.jar}"/>
- <copy todir="${lib.dir}" file="${excalibur-event.jar}"/>
- <copy todir="${lib.dir}" file="${commons-collections.jar}"/>
- <copy todir="${lib.dir}" file="${excalibur-util-concurrent.jar}"/>
- <copy todir="${lib.dir}" file="${excalibur-threadcontext.jar}"/>
- <copy todir="${lib.dir}" file="${excalibur-pool.jar}"/>
- <copy todir="${lib.dir}" file="${excalibur-thread.jar}"/>
- <copy todir="${lib.dir}" file="${avalon-lifecycle.jar}"/>
- <copy todir="${lib.dir}" file="${avalon-assembly.jar}"/>
- <copy todir="${lib.dir}" file="${merlin-bootstrap.jar}"/>
- <!--
- <copy todir="${lib.dir}" preservelastmodified="true">
- <fileset dir="${tools.dir}/lib">
- <include name="xerces-2.0.1.jar"/>
- <include name="xml-apis.jar"/>
- <include name="xalan-2.3.1.jar"/>
- </fileset>
- </copy>
- -->
- </target>
-
-
<!-- Creates all the Javadocs -->
<target name="javadocs" depends="compile"
description="Generates the javadocs" unless="skip.javadocs">
@@ -477,6 +464,7 @@
<param name="-link" value="${assembly.api.link}"/>
<param name="-link" value="${lifecycle.api.link}"/>
<param name="-link" value="${meta.api.link}"/>
+ <param name="-link" value="${merlin-spi.api.link}"/>
<param name="-bottom"
value=""Copyright © ${year} Apache Avalon Project. All Rights
Reserved.""/>
</doclet>
1.24 +14 -0 avalon-sandbox/merlin/default.properties
Index: default.properties
===================================================================
RCS file: /home/cvs/avalon-sandbox/merlin/default.properties,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- default.properties 6 Mar 2003 09:20:02 -0000 1.23
+++ default.properties 7 Mar 2003 08:39:41 -0000 1.24
@@ -97,6 +97,11 @@
avalon-lifecycle.name = ${avalon-lifecycle.id}-${avalon-lifecycle.version}.jar
avalon-lifecycle.jar=${local.repository}/${avalon-lifecycle.name}
+# ----- Avalon Meta -----
+avalon-assembly-spi.home=${avalon-sandbox.home}/assembly-spi
+avalon-assembly-spi.lib=${avalon-assembly-spi.home}/build/lib
+avalon-assembly-spi.jar=${avalon-assembly-spi.lib}/avalon-assembly-spi-1.0.jar
+
# ----- Avalon Assembly -----
avalon-assembly.home = ../assembly
avalon-assembly.id = avalon-assembly
@@ -149,6 +154,14 @@
merlin-bootstrap.jar=${local.repository}/${merlin-bootstrap.name}
merlin-bootstrap.path=${remote.repository}/${merlin.family}/jars/${merlin-bootstrap.name}
+# ----- Merlin SPI -----
+merlin-spi.id = merlin-spi
+merlin-spi.version = 1.0
+merlin-spi.key = Merlin SPI
+merlin-spi.name = ${merlin-spi.id}-${merlin-spi.version}.jar
+merlin-spi.jar=${local.repository}/${merlin-spi.name}
+merlin-spi.path=${remote.repository}/${merlin.family}/jars/${merlin-spi.name}
+
# --------------------------------------------------
# Settings used to configure compile environment
@@ -219,6 +232,7 @@
assembly.api.link = ${doc.root}/assembly/build/docs/api
lifecycle.api.link = ${doc.root}/lifecycle/build/docs/api
meta.api.link = ${doc.root}/meta/build/docs/api
+merlin-spi.api.link = ${doc.root}/merlin-spi/build/docs/api
#
# some links used to build the james demo
1.11 +6 -38
avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/block/impl/DefaultBlock.java
Index: DefaultBlock.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/block/impl/DefaultBlock.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- DefaultBlock.java 28 Feb 2003 06:10:36 -0000 1.10
+++ DefaultBlock.java 7 Mar 2003 08:39:41 -0000 1.11
@@ -26,7 +26,6 @@
import org.apache.avalon.assembly.lifestyle.LifestyleException;
import org.apache.avalon.assembly.lifestyle.LifestyleService;
import org.apache.avalon.assembly.lifecycle.AssemblyService;
-import org.apache.avalon.assembly.lifecycle.AssemblyException;
import org.apache.avalon.assembly.util.ExceptionHelper;
import org.apache.avalon.framework.logger.Logger;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
@@ -69,41 +68,10 @@
// static
//-------------------------------------------------------------------------------
- public static final Attributes.Name BLOCK_PACKAGE = new Attributes.Name(
"Block-Package" );
- public static final Attributes.Name OLD_BLOCK_NAME = new Attributes.Name(
"Block-Name" );
-
private static final int DISASSEMBLED = 1000;
private static final int TERMINATED = 2000;
private static final int DISPOSED = 3000;
- public static String getPackageName( Manifest manifest )
- {
- Attributes attributes = manifest.getAttributes( Block.AVALON_BLOCK_KEY );
- if( attributes == null )
- {
- return null;
- }
- if( attributes.containsKey( BLOCK_PACKAGE ) )
- {
- return (String) attributes.get( BLOCK_PACKAGE );
- }
- if( attributes.containsKey( OLD_BLOCK_NAME ) )
- {
- return (String) attributes.get( OLD_BLOCK_NAME );
- }
- return null;
- }
-
- public static boolean isBlock( Manifest manifest )
- {
- if( manifest == null )
- {
- return false;
- }
- return ( manifest.getAttributes( Block.AVALON_BLOCK_KEY ) != null );
- }
-
-
//-------------------------------------------------------------------------------
// state
//-------------------------------------------------------------------------------
@@ -350,9 +318,9 @@
* container creating appliance instances for the component is is
* managing together with assembly of its sub-containers.
*
- * @exception AssemblyException if an error occurs during appliance assembly
+ * @exception ApplianceException if an error occurs during appliance assembly
*/
- public void assemble( DependencyGraph graph ) throws AssemblyException
+ public void assemble( DependencyGraph graph ) throws ApplianceException
{
if( m_assembled )
{
@@ -382,11 +350,11 @@
{
assembleComponents( graph );
}
- catch( AssemblyException e )
+ catch( Throwable e )
{
final String error =
"Assembly failure attributable to embedded appliance.";
- throw new AssemblyException( error, e );
+ throw new ApplianceException( error, e );
}
//
@@ -417,7 +385,7 @@
"Could not establish a sub-container: "
+ block
+ " in block: " + this;
- throw new AssemblyException( error, e );
+ throw new ApplianceException( error, e );
}
}
@@ -447,7 +415,7 @@
* Startup the components in this container.
* @exception Exception if a startup error occurs
*/
- private void assembleComponents( DependencyGraph graph ) throws
AssemblyException
+ private void assembleComponents( DependencyGraph graph ) throws
ApplianceException
{
Iterator iterator = m_appliances.iterator();
while( iterator.hasNext() )
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]