geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r764556 [1/5] - in /geronimo/sandbox/gnodet/blueprint: ./ itests/ itests/src/ itests/src/test/ itests/src/test/java/ itests/src/test/java/org/ itests/src/test/java/org/apache/ itests/src/test/java/org/apache/felix/ itests/src/test/java/org/...
Date Mon, 13 Apr 2009 18:49:24 GMT
Author: gnodet
Date: Mon Apr 13 18:49:20 2009
New Revision: 764556

URL: http://svn.apache.org/viewvc?rev=764556&view=rev
Log:
Reorganize to add integration tests, remove iPojo dep, add xbean-reflect dependency

Added:
    geronimo/sandbox/gnodet/blueprint/itests/
    geronimo/sandbox/gnodet/blueprint/itests/pom.xml
    geronimo/sandbox/gnodet/blueprint/itests/src/
    geronimo/sandbox/gnodet/blueprint/itests/src/test/
    geronimo/sandbox/gnodet/blueprint/itests/src/test/java/
    geronimo/sandbox/gnodet/blueprint/itests/src/test/java/org/
    geronimo/sandbox/gnodet/blueprint/itests/src/test/java/org/apache/
    geronimo/sandbox/gnodet/blueprint/itests/src/test/java/org/apache/felix/
    geronimo/sandbox/gnodet/blueprint/itests/src/test/java/org/apache/felix/blueprint/
    geronimo/sandbox/gnodet/blueprint/itests/src/test/java/org/apache/felix/blueprint/itests/
    geronimo/sandbox/gnodet/blueprint/itests/src/test/java/org/apache/felix/blueprint/itests/Test.java
    geronimo/sandbox/gnodet/blueprint/itests/src/test/resources/
    geronimo/sandbox/gnodet/blueprint/itests/src/test/resources/org/
    geronimo/sandbox/gnodet/blueprint/itests/src/test/resources/org/apache/
    geronimo/sandbox/gnodet/blueprint/itests/src/test/resources/org/apache/felix/
    geronimo/sandbox/gnodet/blueprint/itests/src/test/resources/org/apache/felix/blueprint/
    geronimo/sandbox/gnodet/blueprint/itests/src/test/resources/org/apache/felix/blueprint/MANIFEST.MF
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/pom.xml
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Instanciator.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/ModuleContextImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Parser.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/convert/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/convert/ConversionServiceImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/namespace/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/namespace/ComponentDefinitionRegistryImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/namespace/NamespaceHandlerRegistry.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/namespace/NamespaceHandlerRegistryImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/namespace/ParserContextImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ArrayValueImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/BindingListenerMetadataImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/CollectionBasedServiceReferenceComponentMetadataImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ComponentMetadataImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ComponentValueImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ConstructorInjectionMetadataImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ListValueImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/LocalComponentMetadataImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/MapValueImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/MethodInjectionMetadataImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ParameterSpecificationImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/PropertiesValueImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/PropertyInjectionMetadataImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ReferenceNameValueImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ReferenceValueImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/RegistrationListenerMetadataImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ServiceExportComponentMetadataImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ServiceReferenceComponentMetadataImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/SetValueImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/TypedStringValueImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/UnaryServiceReferenceComponentMetadataImpl.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ComponentDefinitionException.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ModuleContext.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ModuleContextEventConstants.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ModuleContextListener.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/NoSuchComponentException.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ServiceUnavailableException.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/package.html
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/ConversionService.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/Converter.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/package.html
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/ComponentDefinitionRegistry.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/ComponentNameAlreadyInUseException.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/NamespaceHandler.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/ParserContext.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/package.html
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/ArrayValue.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/BindingListenerMetadata.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/CollectionBasedServiceReferenceComponentMetadata.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/ComponentValue.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/ConstructorInjectionMetadata.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/ListValue.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/LocalComponentMetadata.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/MapValue.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/MethodInjectionMetadata.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/NullValue.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/ParameterSpecification.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/PropertiesValue.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/PropertyInjectionMetadata.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/ReferenceNameValue.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/ReferenceValue.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/RegistrationListenerMetadata.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/ServiceExportComponentMetadata.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceComponentMetadata.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/SetValue.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/TypedStringValue.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/UnaryServiceReferenceComponentMetadata.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/Value.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/package.html
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/resources/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/resources/org/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/resources/org/apache/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/resources/org/apache/felix/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/resources/org/apache/felix/blueprint/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/resources/org/apache/felix/blueprint/blueprint-compendium.xsd
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/resources/org/apache/felix/blueprint/blueprint.xsd
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/org/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/ParserTest.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/WiringTest.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/convert/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/convert/ConversionServiceImplTest.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/pojos/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/pojos/ConverterA.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/pojos/ConverterB.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/pojos/InterfaceA.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/pojos/ListenerA.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/pojos/PojoA.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/java/org/apache/felix/blueprint/pojos/PojoB.java
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/resources/
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/resources/test-simple-component.xml
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/resources/test-wiring.xml
    geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/test/resources/test.xml
Removed:
    geronimo/sandbox/gnodet/blueprint/src/
Modified:
    geronimo/sandbox/gnodet/blueprint/pom.xml

Added: geronimo/sandbox/gnodet/blueprint/itests/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/itests/pom.xml?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/itests/pom.xml (added)
+++ geronimo/sandbox/gnodet/blueprint/itests/pom.xml Mon Apr 13 18:49:20 2009
@@ -0,0 +1,72 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project>
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>blueprint</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.apache.felix.blueprint.itests</artifactId>
+    <groupId>org.apache.felix</groupId>
+    <name>Apache Felix Blueprint iTests</name>
+    <version>1.0.0-SNAPSHOT</version>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.servicemix.kernel.testing</groupId>
+            <artifactId>org.apache.servicemix.kernel.testing.support</artifactId>
+            <version>1.1.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.blueprint</artifactId>
+            <version>${pom.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.servicemix.tooling</groupId>
+                <artifactId>depends-maven-plugin</artifactId>
+                <version>1.1</version>
+                <executions>
+                    <execution>
+                        <id>generate-depends-file</id>
+                        <goals>
+                            <goal>generate-depends-file</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Added: geronimo/sandbox/gnodet/blueprint/itests/src/test/java/org/apache/felix/blueprint/itests/Test.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/itests/src/test/java/org/apache/felix/blueprint/itests/Test.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/itests/src/test/java/org/apache/felix/blueprint/itests/Test.java
(added)
+++ geronimo/sandbox/gnodet/blueprint/itests/src/test/java/org/apache/felix/blueprint/itests/Test.java
Mon Apr 13 18:49:20 2009
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.blueprint.itests;
+
+import org.apache.servicemix.kernel.testing.support.AbstractIntegrationTest;
+
+public class Test extends AbstractIntegrationTest {
+
+    public void test() throws Exception {
+    }
+
+    /**
+	 * The manifest to use for the "virtual bundle" created
+	 * out of the test classes and resources in this project
+	 *
+	 * This is actually the boilerplate manifest with one additional
+	 * import-package added. We should provide a simpler customization
+	 * point for such use cases that doesn't require duplication
+	 * of the entire manifest...
+	 */
+	protected String getManifestLocation() {
+		return "classpath:org/apache/felix/blueprint/MANIFEST.MF";
+	}
+
+	/**
+	 * The location of the packaged OSGi bundles to be installed
+	 * for this test. Values are Spring resource paths. The bundles
+	 * we want to use are part of the same multi-project maven
+	 * build as this project is. Hence we use the localMavenArtifact
+	 * helper method to find the bundles produced by the package
+	 * phase of the maven build (these tests will run after the
+	 * packaging phase, in the integration-test phase).
+	 *
+	 * JUnit, commons-logging, spring-core and the spring OSGi
+	 * test bundle are automatically included so do not need
+	 * to be specified here.
+	 */
+	protected String[] getTestBundlesNames() {
+        return new String[] {
+                getBundle("org.apache.xbean", "xbean-reflect"),
+                getBundle("org.apache.felix", "org.apache.felix.blueprint"),
+		};
+	}
+
+}

Added: geronimo/sandbox/gnodet/blueprint/itests/src/test/resources/org/apache/felix/blueprint/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/itests/src/test/resources/org/apache/felix/blueprint/MANIFEST.MF?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/itests/src/test/resources/org/apache/felix/blueprint/MANIFEST.MF
(added)
+++ geronimo/sandbox/gnodet/blueprint/itests/src/test/resources/org/apache/felix/blueprint/MANIFEST.MF
Mon Apr 13 18:49:20 2009
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-Name: org.apache.servicemix.test
+Bundle-SymbolicName: org.apache.servicemix.test
+Bundle-Activator: org.springframework.osgi.test.JUnitTestActivator
+DynamicImport-Package: *
+Export-Package: org.apache.felix.blueprint.itests

Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/pom.xml?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/pom.xml (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/pom.xml Mon Apr 13 18:49:20
2009
@@ -0,0 +1,80 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project>
+ <parent>
+    <groupId>org.apache.felix</groupId>
+    <artifactId>blueprint</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>org.apache.felix.blueprint</artifactId>
+  <groupId>org.apache.felix</groupId>
+  <name>Apache Felix Blueprint</name>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+  
+  <dependencies>
+      <dependency>
+          <groupId>org.apache.xbean</groupId>
+          <artifactId>xbean-reflect</artifactId>
+          <version>3.6-SNAPSHOT</version>
+      </dependency>
+      <dependency>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.osgi.core</artifactId>
+          <version>1.2.0</version>
+          <scope>provided</scope>
+      </dependency>
+      <dependency>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.osgi.compendium</artifactId>
+          <version>1.2.0</version>
+          <scope>provided</scope>
+      </dependency>
+  </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>2.0.0</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Export-Package>org.apache.felix.blueprint*;version="${pom.version}"</Export-Package>
+                        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+                        <IPOJO-Extension>
+                            blueprint:org.apache.felix.blueprint.ipojo.BlueprintFactory 
+                        </IPOJO-Extension>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+  
+</project>

Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Instanciator.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Instanciator.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Instanciator.java
(added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/Instanciator.java
Mon Apr 13 18:49:20 2009
@@ -0,0 +1,121 @@
+package org.apache.felix.blueprint.context;
+
+import java.util.Set;
+import java.util.Collection;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.HashSet;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.xbean.recipe.Repository;
+import org.apache.xbean.recipe.DefaultRepository;
+import org.apache.xbean.recipe.ObjectRecipe;
+import org.apache.xbean.recipe.CollectionRecipe;
+import org.apache.xbean.recipe.MapRecipe;
+import org.apache.xbean.recipe.ConstructionException;
+import org.osgi.service.blueprint.namespace.ComponentDefinitionRegistry;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.LocalComponentMetadata;
+import org.osgi.service.blueprint.reflect.PropertyInjectionMetadata;
+import org.osgi.service.blueprint.reflect.Value;
+import org.osgi.service.blueprint.reflect.NullValue;
+import org.osgi.service.blueprint.reflect.TypedStringValue;
+import org.osgi.service.blueprint.reflect.ReferenceValue;
+import org.osgi.service.blueprint.reflect.ListValue;
+import org.osgi.service.blueprint.reflect.SetValue;
+import org.osgi.service.blueprint.reflect.MapValue;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 13, 2009
+ * Time: 5:36:40 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class Instanciator {
+
+    public static Repository createRepository(ComponentDefinitionRegistry registry) throws
Exception {
+        Repository repository = new DefaultRepository();
+        // Create recipes
+        for (String name : (Set<String>) registry.getComponentDefinitionNames()) {
+            ComponentMetadata component = registry.getComponentDefinition(name);
+            if (component instanceof LocalComponentMetadata) {
+                LocalComponentMetadata local = (LocalComponentMetadata) component;
+                ObjectRecipe recipe = new ObjectRecipe(local.getClassName());
+                recipe.setName(name);
+                repository.add(name, recipe);
+            } else {
+                throw new IllegalStateException("Unsupported component " + component.getClass());
+            }
+        }
+        // Populate recipes
+        for (String name : (Set<String>) registry.getComponentDefinitionNames()) {
+            ComponentMetadata component = registry.getComponentDefinition(name);
+            if (component instanceof LocalComponentMetadata) {
+                LocalComponentMetadata local = (LocalComponentMetadata) component;
+                ObjectRecipe recipe = (ObjectRecipe) repository.get(local.getName());
+                for (PropertyInjectionMetadata property : (Collection<PropertyInjectionMetadata>)
local.getPropertyInjectionMetadata()) {
+                    Object value = getValue(repository, property.getValue());
+                    recipe.setProperty(property.getName(), value);
+                }
+                // TODO: constructor args
+                // TODO: init-method
+                // TODO: destroy-method
+                // TODO: lazy
+                // TODO: scope
+                // TODO: factory-method
+                // TODO: factory-component
+            } else {
+                // TODO
+                throw new IllegalStateException("Unsupported component " + component.getClass());
+            }
+        }
+        return repository;
+    }
+
+    private static Object getValue(Repository repository, Value v) {
+        Object value;
+        if (v instanceof NullValue) {
+            value = null;
+        } else if (v instanceof TypedStringValue) {
+            value = ((TypedStringValue) v).getStringValue();
+            // TODO: type name ?
+        } else if (v instanceof ReferenceValue) {
+            String componentName = ((ReferenceValue) v).getComponentName();
+            if (repository.contains(componentName)) {
+                value = repository.get(componentName);
+            } else {
+                throw new IllegalStateException("Undefined reference: " + componentName);
+            }
+        } else if (v instanceof ListValue) {
+            CollectionRecipe cr = new CollectionRecipe(ArrayList.class);
+            for (Value lv : (List<Value>) ((ListValue) v).getList()) {
+                cr.add(getValue(repository, lv));
+            }
+            value = cr;
+            // TODO: ListValue#getValueType()
+        } else if (v instanceof SetValue) {
+            CollectionRecipe cr = new CollectionRecipe(HashSet.class);
+            for (Value lv : (Set<Value>) ((SetValue) v).getSet()) {
+                cr.add(getValue(repository, lv));
+            }
+            value = cr;
+            // TODO: SetValue#getValueType()
+        } else if (v instanceof MapValue) {
+            MapRecipe mr = new MapRecipe(HashMap.class);
+            for (Map.Entry<Value,Value> entry : ((Map<Value,Value>) ((MapValue)
v).getMap()).entrySet()) {
+                Object key = getValue(repository, entry.getKey());
+                Object val = getValue(repository, entry.getValue());
+                mr.put(key, val);
+            }
+            value = mr;
+            // TODO: MapValue#getKeyType()
+            // TODO: MapValue#getValueType()
+        } else {
+            throw new IllegalStateException("Unsupported value: " + v.getClass().getName());
+        }
+        return value;
+    }
+
+}

Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/ModuleContextImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/ModuleContextImpl.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/ModuleContextImpl.java
(added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/context/ModuleContextImpl.java
Mon Apr 13 18:49:20 2009
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.blueprint.context;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
+
+import org.apache.felix.blueprint.namespace.ComponentDefinitionRegistryImpl;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.blueprint.context.ModuleContext;
+import org.osgi.service.blueprint.context.NoSuchComponentException;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.LocalComponentMetadata;
+import org.osgi.service.blueprint.reflect.ServiceExportComponentMetadata;
+import org.osgi.service.blueprint.reflect.ServiceReferenceComponentMetadata;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Apache Felix Project</a>
+ * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
+ */
+public class ModuleContextImpl implements ModuleContext {
+
+    private BundleContext bundleContext;
+    private ComponentDefinitionRegistryImpl componentDefinitionRegistry;
+
+    public ModuleContextImpl() {
+    }
+
+    public Set<String> getComponentNames() {
+        return componentDefinitionRegistry.getComponentDefinitionNames();
+    }
+
+    public Object getComponent(String name) throws NoSuchComponentException {
+        ComponentMetadata metadata = getComponentMetadata(name);
+        // TODO: get the component instance
+        return null;
+    }
+
+    public ComponentMetadata getComponentMetadata(String name) {
+        ComponentMetadata metadata = componentDefinitionRegistry.getComponentDefinition(name);
+        if (metadata == null) {
+            throw new NoSuchComponentException(name);
+        }
+        return metadata;
+    }
+
+    public Collection<ServiceReferenceComponentMetadata> getReferencedServicesMetadata()
{
+        return getMetadata(ServiceReferenceComponentMetadata.class);
+    }
+
+    public Collection<ServiceExportComponentMetadata> getExportedServicesMetadata()
{
+        return getMetadata(ServiceExportComponentMetadata.class);
+    }
+
+    public Collection<LocalComponentMetadata> getLocalComponentsMetadata() {
+        return getMetadata(LocalComponentMetadata.class);
+    }
+
+    private <T> Collection<T> getMetadata(Class<T> clazz) {
+        Collection<T> metadatas = new ArrayList<T>();
+        for (String name : componentDefinitionRegistry.getComponentDefinitionNames()) {
+            ComponentMetadata component = componentDefinitionRegistry.getComponentDefinition(name);
+            if (clazz.isInstance(component)) {
+                metadatas.add(clazz.cast(component));
+            }
+        }
+        metadatas = Collections.unmodifiableCollection(metadatas);
+        return metadatas;
+
+    }
+
+    public BundleContext getBundleContext() {
+        return bundleContext;
+    }
+}



Mime
View raw message