donaldp 2002/11/15 14:31:14
Modified: info default.properties
info/src/java/org/apache/avalon/framework/info
ComponentInfo.java
info/src/java/org/apache/avalon/framework/tools/infobuilder
LegacyBlockInfoReader.java XMLInfoReader.java
XMLInfoWriter.java
info/src/java/org/apache/avalon/framework/tools/qdox
QDoxInfoBuilder.java
info/src/java/org/apache/avalon/framework/tools/verifier
InfoVerifier.java
info/src/test/org/apache/avalon/framework/tools/infobuilder/test
InfoAssert.java InfoBuilderTestCase.java
info/src/test/org/apache/avalon/framework/tools/infobuilder/test/data
component1-info.xml
Log:
Integrate the SchemaDescriptor into the build process.
Revision Changes Path
1.4 +1 -1 jakarta-avalon-excalibur/info/default.properties
Index: default.properties
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/info/default.properties,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- default.properties 13 Nov 2002 12:19:24 -0000 1.3
+++ default.properties 15 Nov 2002 22:31:13 -0000 1.4
@@ -18,7 +18,7 @@
# ----- Avalon Framework, version 4.1 or later -----
avalon-framework.home=${basedir}/../../jakarta-avalon
-avalon-framework.lib=${avalon-framework.home}/build/lib
+avalon-framework.lib=${avalon-framework.home}/target/lib
avalon-framework.jar=${avalon-framework.lib}/avalon-framework.jar
# ----- Excalibur i18n, version 1.0 or later -----
1.6 +28 -7
jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/ComponentInfo.java
Index: ComponentInfo.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/ComponentInfo.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ComponentInfo.java 14 Nov 2002 12:20:51 -0000 1.5
+++ ComponentInfo.java 15 Nov 2002 22:31:14 -0000 1.6
@@ -49,6 +49,11 @@
private final ContextDescriptor m_context;
/**
+ * Descriptor for the schema of components configuration/parameters.
+ */
+ private final SchemaDescriptor m_schema;
+
+ /**
* Descriptor for the service dependencies of component.
*/
private final DependencyDescriptor[] m_dependencies;
@@ -57,15 +62,20 @@
* Basic constructor that takes as parameters all parts.
*/
public ComponentInfo( final ComponentDescriptor descriptor,
+ final ServiceDescriptor[] services,
final LoggerDescriptor[] loggers,
final ContextDescriptor context,
- final ServiceDescriptor[] services,
+ final SchemaDescriptor schema,
final DependencyDescriptor[] dependencies )
{
if( null == descriptor )
{
throw new NullPointerException( "descriptor" );
}
+ if( null == services )
+ {
+ throw new NullPointerException( "services" );
+ }
if( null == loggers )
{
throw new NullPointerException( "loggers" );
@@ -74,18 +84,19 @@
{
throw new NullPointerException( "context" );
}
- if( null == services )
+ if( null == schema )
{
- throw new NullPointerException( "services" );
+ throw new NullPointerException( "schema" );
}
if( null == dependencies )
{
throw new NullPointerException( "dependencies" );
}
m_descriptor = descriptor;
+ m_services = services;
m_loggers = loggers;
m_context = context;
- m_services = services;
+ m_schema = schema;
m_dependencies = dependencies;
}
@@ -94,7 +105,7 @@
*
* @return the Component descriptor.
*/
- public ComponentDescriptor getComponentDescriptor()
+ public ComponentDescriptor getDescriptor()
{
return m_descriptor;
}
@@ -125,9 +136,19 @@
*
* @return the ContextDescriptor for Component, may be null.
*/
- public ContextDescriptor getContextDescriptor()
+ public ContextDescriptor getContext()
{
return m_context;
+ }
+
+ /**
+ * Return the schema for the configuration/parameters.
+ *
+ * @return the schema for the configuration/parameters.
+ */
+ public SchemaDescriptor getSchema()
+ {
+ return m_schema;
}
/**
1.3 +4 -2
jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/infobuilder/LegacyBlockInfoReader.java
Index: LegacyBlockInfoReader.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/infobuilder/LegacyBlockInfoReader.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LegacyBlockInfoReader.java 14 Nov 2002 07:44:32 -0000 1.2
+++ LegacyBlockInfoReader.java 15 Nov 2002 22:31:14 -0000 1.3
@@ -22,6 +22,7 @@
import org.apache.avalon.framework.info.EntryDescriptor;
import org.apache.avalon.framework.info.LoggerDescriptor;
import org.apache.avalon.framework.info.ServiceDescriptor;
+import org.apache.avalon.framework.info.SchemaDescriptor;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.xml.sax.InputSource;
@@ -114,9 +115,10 @@
}
return new ComponentInfo( descriptor,
+ services,
new LoggerDescriptor[ 0 ],
buildPhoenixContext(),
- services,
+ new SchemaDescriptor( "", "", "", new Attribute[
0 ] ),
dependencies );
}
1.3 +37 -14
jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/infobuilder/XMLInfoReader.java
Index: XMLInfoReader.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/infobuilder/XMLInfoReader.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XMLInfoReader.java 14 Nov 2002 07:44:32 -0000 1.2
+++ XMLInfoReader.java 15 Nov 2002 22:31:14 -0000 1.3
@@ -23,6 +23,7 @@
import org.apache.avalon.framework.info.EntryDescriptor;
import org.apache.avalon.framework.info.LoggerDescriptor;
import org.apache.avalon.framework.info.ServiceDescriptor;
+import org.apache.avalon.framework.info.SchemaDescriptor;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.xml.sax.InputSource;
@@ -108,6 +109,9 @@
final DependencyDescriptor[] dependencies =
buildDependencies( implementationKey, configuration );
+ configuration = info.getChild( "schema" );
+ final SchemaDescriptor schema = buildSchema( configuration );
+
if( getLogger().isDebugEnabled() )
{
final String message =
@@ -120,11 +124,30 @@
getLogger().debug( message );
}
- return new ComponentInfo( descriptor, loggers, context, services,
dependencies );
+ return new ComponentInfo( descriptor, services, loggers,
+ context, schema, dependencies );
+ }
+
+ /**
+ * A utility method to build a {@link SchemaDescriptor} object
+ * from specified configuraiton.
+ *
+ * @param configuration the loggers configuration
+ * @return the created Schema
+ * @throws ConfigurationException if an error occurs
+ */
+ private SchemaDescriptor buildSchema( final Configuration configuration )
+ throws ConfigurationException
+ {
+ final String category = configuration.getAttribute( "category", "" );
+ final String location = configuration.getAttribute( "location", "" );
+ final String type = configuration.getAttribute( "type", "" );
+ final Attribute[] attributes = buildAttributes( configuration );
+ return new SchemaDescriptor( category, location, type, attributes );
}
/**
- * A utility method to buildComponentInfo an array of {@link LoggerDescriptor}
objects
+ * A utility method to build an array of {@link LoggerDescriptor} objects
* from specified configuraiton.
*
* @param configuration the loggers configuration
@@ -147,7 +170,7 @@
}
/**
- * A utility method to buildComponentInfo a {@link LoggerDescriptor}
+ * A utility method to build a {@link LoggerDescriptor}
* object from specified configuraiton.
*
* @param logger the Logger configuration
@@ -163,7 +186,7 @@
}
/**
- * A utility method to buildComponentInfo an array of {@link
DependencyDescriptor}
+ * A utility method to build an array of {@link DependencyDescriptor}
* objects from specified configuration and classname.
*
* @param classname The classname of Component (used for logging purposes)
@@ -189,7 +212,7 @@
}
/**
- * A utility method to buildComponentInfo a {@link DependencyDescriptor}
+ * A utility method to build a {@link DependencyDescriptor}
* object from specified configuraiton.
*
* @param classname The classname of Component (used for logging purposes)
@@ -233,7 +256,7 @@
}
/**
- * A utility method to buildComponentInfo a {@link ContextDescriptor}
+ * A utility method to build a {@link ContextDescriptor}
* object from specified configuraiton.
*
* @param context the dependency configuration
@@ -256,10 +279,10 @@
}
/**
- * A utility method to buildComponentInfo an array of {@link EntryDescriptor}
+ * A utility method to build an array of {@link EntryDescriptor}
* objects from specified configuraiton.
*
- * @param entrySet the set of entrys to buildComponentInfo
+ * @param entrySet the set of entrys to build
* @return the created {@link EntryDescriptor}s
* @throws ConfigurationException if an error occurs
*/
@@ -297,7 +320,7 @@
}
/**
- * A utility method to buildComponentInfo an array of {@link ServiceDescriptor}
+ * A utility method to build an array of {@link ServiceDescriptor}
* objects from specified configuraiton.
*
* @param servicesSet the services configuration
@@ -320,7 +343,7 @@
}
/**
- * A utility method to buildComponentInfo a {@link ServiceDescriptor}
+ * A utility method to build a {@link ServiceDescriptor}
* object from specified configuraiton data.
*
* @param service the service Configuration
@@ -360,9 +383,9 @@
/**
* Build a attribute from a specific configuration.
*
- * @param config the configuration to buildComponentInfo attribute from
+ * @param config the configuration to build attribute from
* @return the new Attribute
- * @throws ConfigurationException if unable to buildComponentInfo attribute due
to malformed xml
+ * @throws ConfigurationException if unable to build attribute due to malformed
xml
*/
private Attribute buildAttribute( Configuration config )
throws ConfigurationException
@@ -394,7 +417,7 @@
}
/**
- * A utility method to buildComponentInfo a {@link ComponentDescriptor}
+ * A utility method to build a {@link ComponentDescriptor}
* object from specified configuraiton data and classname.
*
* @param config the Component Configuration
1.4 +30 -3
jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/infobuilder/XMLInfoWriter.java
Index: XMLInfoWriter.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/infobuilder/XMLInfoWriter.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XMLInfoWriter.java 14 Nov 2002 07:44:32 -0000 1.3
+++ XMLInfoWriter.java 15 Nov 2002 22:31:14 -0000 1.4
@@ -19,6 +19,7 @@
import org.apache.avalon.framework.info.EntryDescriptor;
import org.apache.avalon.framework.info.ServiceDescriptor;
import org.apache.avalon.framework.info.DependencyDescriptor;
+import org.apache.avalon.framework.info.SchemaDescriptor;
/**
* Write {@link ComponentInfo} objects to a stream as xml documents.
@@ -46,13 +47,39 @@
writeHeader( writer );
writeDoctype( writer, "component-info" );
writer.write( "<component-info>" );
- writeComponent( writer, info.getComponentDescriptor() );
+ writeComponent( writer, info.getDescriptor() );
writeLoggers( writer, info.getLoggers() );
- writeContext( writer, info.getContextDescriptor() );
+ writeContext( writer, info.getContext() );
writeServices( writer, info.getServices() );
writeDependencies( writer, info.getDependencies() );
+ writeSchema( writer, info.getSchema() );
writer.write( "</component-info>" );
writer.flush();
+ }
+
+ /**
+ * Write out Schema Descriptor.
+ *
+ * @param writer the writer
+ * @param schema the descriptor
+ * @throws IOException if unable to write xml
+ */
+ private void writeSchema( final Writer writer,
+ final SchemaDescriptor schema )
+ throws IOException
+ {
+ if( !"".equals( schema.getCategory() ) )
+ {
+ writer.write( "<schema category=\"" );
+ writer.write( schema.getCategory() );
+ final String location = schema.getLocation();
+ if( !"".equals( location ) )
+ {
+ writer.write( "\" location=\"" );
+ writer.write( location );
+ }
+ writer.write( "\"/>" );
+ }
}
private void writeHeader( final Writer writer )
1.2 +60 -20
jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/qdox/QDoxInfoBuilder.java
Index: QDoxInfoBuilder.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/qdox/QDoxInfoBuilder.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- QDoxInfoBuilder.java 12 Nov 2002 06:55:42 -0000 1.1
+++ QDoxInfoBuilder.java 15 Nov 2002 22:31:14 -0000 1.2
@@ -20,6 +20,7 @@
import org.apache.avalon.framework.info.EntryDescriptor;
import org.apache.avalon.framework.info.LoggerDescriptor;
import org.apache.avalon.framework.info.ServiceDescriptor;
+import org.apache.avalon.framework.info.SchemaDescriptor;
/**
* This is a utility class that is used to build a ComponentInfo object
@@ -31,12 +32,16 @@
*/
public class QDoxInfoBuilder
{
- private static final String CONTEXT_CLASS =
"org.apache.avalon.framework.context.Context";
private static final String LOGGER_CLASS =
"org.apache.avalon.framework.logger.Logger";
+ private static final String CONTEXT_CLASS =
"org.apache.avalon.framework.context.Context";
private static final String COMPONENT_MANAGER_CLASS =
"org.apache.avalon.framework.component.ComponentManager";
private static final String SERVICE_MANAGER_CLASS =
"org.apache.avalon.framework.service.ServiceManager";
+ private static final String CONFIGURATION_CLASS =
+ "org.apache.avalon.framework.configuration.Configuration";
+ private static final String PARAMETERS_CLASS =
+ "org.apache.avalon.framework.parameters.Parameters";
private static final Attribute[] EMPTY_ATTRIBUTES = new Attribute[ 0 ];
@@ -48,13 +53,14 @@
*/
public ComponentInfo buildComponentInfo( final JavaClass javaClass )
{
- final ComponentDescriptor component = buildComponentDescriptor( javaClass );
- final ContextDescriptor context = buildContextDescriptor( javaClass );
- final LoggerDescriptor[] loggers = buildLoggers( javaClass );
+ final ComponentDescriptor component = buildComponent( javaClass );
final ServiceDescriptor[] services = buildServices( javaClass );
+ final ContextDescriptor context = buildContext( javaClass );
+ final LoggerDescriptor[] loggers = buildLoggers( javaClass );
+ final SchemaDescriptor schema = buildSchema( javaClass );
final DependencyDescriptor[] dependencies = buildDependencies( javaClass );
- return new ComponentInfo( component, loggers, context, services,
dependencies );
+ return new ComponentInfo( component, services, loggers, context, schema,
dependencies );
}
/**
@@ -63,13 +69,34 @@
* @param javaClass the class
* @return the component descriptor
*/
- private ComponentDescriptor buildComponentDescriptor( final JavaClass javaClass
)
+ private ComponentDescriptor buildComponent( final JavaClass javaClass )
{
final String type = javaClass.getFullyQualifiedName();
return new ComponentDescriptor( type, EMPTY_ATTRIBUTES );
}
/**
+ * Build the set of service descriptors for specified class.
+ *
+ * @param javaClass the class
+ * @return the set of service descriptors
+ */
+ private ServiceDescriptor[] buildServices( final JavaClass javaClass )
+ {
+ final ArrayList services = new ArrayList();
+ final DocletTag[] tags = javaClass.getTagsByName( "avalon.service" );
+ for( int i = 0; i < tags.length; i++ )
+ {
+ final DocletTag tag = tags[ i ];
+ final String unresolvedType = getNamedParameter( tag, "type" );
+ final String type = resolveType( javaClass, unresolvedType );
+ final ServiceDescriptor service = new ServiceDescriptor( type,
EMPTY_ATTRIBUTES );
+ services.add( service );
+ }
+ return (ServiceDescriptor[])services.toArray( new ServiceDescriptor[
services.size() ] );
+ }
+
+ /**
* Build the set of logger descriptors for specified class.
*
* @param javaClass the class
@@ -105,7 +132,7 @@
* @param javaClass the class
* @return the context descriptor
*/
- private ContextDescriptor buildContextDescriptor( final JavaClass javaClass )
+ private ContextDescriptor buildContext( final JavaClass javaClass )
{
final JavaMethod method =
getLifecycleMethod( javaClass, "contextualize", CONTEXT_CLASS );
@@ -145,24 +172,37 @@
}
/**
- * Build the set of service descriptors for specified class.
+ * Build the schema descriptor for specified class.
*
* @param javaClass the class
- * @return the set of service descriptors
+ * @return the schema descriptor
*/
- private ServiceDescriptor[] buildServices( final JavaClass javaClass )
+ private SchemaDescriptor buildSchema( final JavaClass javaClass )
{
- final ArrayList services = new ArrayList();
- final DocletTag[] tags = javaClass.getTagsByName( "avalon.service" );
- for( int i = 0; i < tags.length; i++ )
+ String category = "configuration";
+ JavaMethod method =
+ getLifecycleMethod( javaClass, "configure", CONFIGURATION_CLASS );
+ DocletTag tag = null;
+ if( null != method )
{
- final DocletTag tag = tags[ i ];
- final String unresolvedType = getNamedParameter( tag, "type" );
- final String type = resolveType( javaClass, unresolvedType );
- final ServiceDescriptor service = new ServiceDescriptor( type,
EMPTY_ATTRIBUTES );
- services.add( service );
+ tag = method.getTagByName( "avalon.configuration" );
}
- return (ServiceDescriptor[])services.toArray( new ServiceDescriptor[
services.size() ] );
+ else
+ {
+ method =
+ getLifecycleMethod( javaClass, "parameterize", PARAMETERS_CLASS );
+ category = "parameters";
+ if( null == method )
+ {
+ return new SchemaDescriptor( "", "", "", EMPTY_ATTRIBUTES );
+ }
+ tag = method.getTagByName( "avalon.parameters" );
+ }
+
+ final String location = getNamedParameter( tag, "location", "" );
+ final String type = getNamedParameter( tag, "type", "" );
+
+ return new SchemaDescriptor( category, location, type, EMPTY_ATTRIBUTES );
}
/**
1.2 +2 -4
jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/verifier/InfoVerifier.java
Index: InfoVerifier.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/verifier/InfoVerifier.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- InfoVerifier.java 14 Sep 2002 06:07:17 -0000 1.1
+++ InfoVerifier.java 15 Nov 2002 22:31:14 -0000 1.2
@@ -17,8 +17,6 @@
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.logger.Logger;
import org.apache.avalon.framework.service.Serviceable;
-import org.apache.avalon.framework.tools.verifier.VerifyException;
-import org.apache.avalon.framework.tools.verifier.ComponentVerifier;
/**
* This Class verifies that an implementation is valid wrt the
@@ -136,7 +134,7 @@
final Class implementation )
throws VerifyException
{
- final ContextDescriptor context = info.getContextDescriptor();
+ final ContextDescriptor context = info.getContext();
final int count = context.getEntrys().length;
if( !Contextualizable.class.isAssignableFrom( implementation ) )
1.5 +7 -7
jakarta-avalon-excalibur/info/src/test/org/apache/avalon/framework/tools/infobuilder/test/InfoAssert.java
Index: InfoAssert.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/info/src/test/org/apache/avalon/framework/tools/infobuilder/test/InfoAssert.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- InfoAssert.java 14 Nov 2002 07:44:48 -0000 1.4
+++ InfoAssert.java 15 Nov 2002 22:31:14 -0000 1.5
@@ -31,8 +31,8 @@
final ComponentInfo expected,
final ComponentInfo actual )
{
- final ComponentDescriptor expectedComponent =
expected.getComponentDescriptor();
- final ComponentDescriptor actualComponent = actual.getComponentDescriptor();
+ final ComponentDescriptor expectedComponent = expected.getDescriptor();
+ final ComponentDescriptor actualComponent = actual.getDescriptor();
assertEqualAttributes( message + ": Component.attribute",
expectedComponent.getAttributes(),
actualComponent.getAttributes() );
@@ -44,8 +44,8 @@
final ComponentInfo expected,
final ComponentInfo actual )
{
- final ComponentDescriptor expectedComponent =
expected.getComponentDescriptor();
- final ComponentDescriptor actualComponent = actual.getComponentDescriptor();
+ final ComponentDescriptor expectedComponent = expected.getDescriptor();
+ final ComponentDescriptor actualComponent = actual.getDescriptor();
assertEqualComponents( message, expectedComponent, actualComponent );
assertEqualFeatures( message, expected, actual );
@@ -59,8 +59,8 @@
final LoggerDescriptor[] actualLoggers = actual.getLoggers();
assertEqualLoggers( message, expectedLoggers, actualLoggers );
- final ContextDescriptor expectedContext = expected.getContextDescriptor();
- final ContextDescriptor actualContext = actual.getContextDescriptor();
+ final ContextDescriptor expectedContext = expected.getContext();
+ final ContextDescriptor actualContext = actual.getContext();
assertEqualContext( message, expectedContext, actualContext );
final ServiceDescriptor[] expectedServices = expected.getServices();
1.12 +12 -5
jakarta-avalon-excalibur/info/src/test/org/apache/avalon/framework/tools/infobuilder/test/InfoBuilderTestCase.java
Index: InfoBuilderTestCase.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/info/src/test/org/apache/avalon/framework/tools/infobuilder/test/InfoBuilderTestCase.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- InfoBuilderTestCase.java 14 Nov 2002 07:44:48 -0000 1.11
+++ InfoBuilderTestCase.java 15 Nov 2002 22:31:14 -0000 1.12
@@ -16,6 +16,7 @@
import org.apache.avalon.framework.info.EntryDescriptor;
import org.apache.avalon.framework.info.ContextDescriptor;
import org.apache.avalon.framework.info.ServiceDescriptor;
+import org.apache.avalon.framework.info.SchemaDescriptor;
import org.apache.avalon.framework.logger.ConsoleLogger;
import org.apache.avalon.framework.tools.infobuilder.InfoBuilder;
import org.apache.avalon.framework.tools.infobuilder.SerializedInfoWriter;
@@ -50,7 +51,7 @@
private static final String BASE_PACKAGE =
"org.apache.avalon.framework.tools.infobuilder.test.data.";
- private static final String BASE_DIR = '/' + BASE_PACKAGE.replace( '.','/');
+ private static final String BASE_DIR = '/' + BASE_PACKAGE.replace( '.', '/' );
private static final String COMPONENT1 = BASE_PACKAGE + "component1";
private static final String COMPONENT2 = BASE_PACKAGE + "component2";
@@ -86,7 +87,6 @@
actual );
}
-
public void testWriteSerComponent1()
throws Exception
{
@@ -141,7 +141,7 @@
outputStream.close();
ContainerUtil.enableLogging( reader, new ConsoleLogger() );
- final String implementationKey =
expected.getComponentDescriptor().getImplementationKey();
+ final String implementationKey =
expected.getDescriptor().getImplementationKey();
final FileInputStream inputStream = new FileInputStream( output );
final ComponentInfo actual = reader.createComponentInfo( implementationKey,
inputStream );
inputStream.close();
@@ -190,7 +190,14 @@
final DependencyDescriptor[] deps =
new DependencyDescriptor[]{dependency1, dependency2};
- return new ComponentInfo( component, loggers, context, services, deps );
+ final SchemaDescriptor schema =
+ new SchemaDescriptor( "configuration",
+ "",
+ "http://relaxng.org/ns/structure/1.0",
+ InfoAssert.EMPTY_ATTRIBUTES );
+
+ return new ComponentInfo( component, services, loggers,
+ context, schema, deps );
}
private ServiceDescriptor createServiceDescriptor()
1.3 +2 -2
jakarta-avalon-excalibur/info/src/test/org/apache/avalon/framework/tools/infobuilder/test/data/component1-info.xml
Index: component1-info.xml
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/info/src/test/org/apache/avalon/framework/tools/infobuilder/test/data/component1-info.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- component1-info.xml 12 Nov 2002 01:09:47 -0000 1.2
+++ component1-info.xml 15 Nov 2002 22:31:14 -0000 1.3
@@ -4,8 +4,7 @@
"http://jakarta.apache.org/avalon/dtds/info/componentinfo_1_0.dtd" >
<component-info>
- <component type="org.realityforge.Component1">
- </component>
+ <component type="org.realityforge.Component1"/>
<loggers>
<logger/>
@@ -30,4 +29,5 @@
<dependency key="foo" type="org.realityforge.Service3"/>
</dependencies>
+ <schema category="configuration" type="http://relaxng.org/ns/structure/1.0"/>
</component-info>
--
To unsubscribe, e-mail: <mailto:avalon-cvs-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@;jakarta.apache.org>