[jboss-osgi-commits] JBoss-OSGI SVN: r99658 - in projects/jboss-osgi/trunk: distribution/installer/src/main/resources/installer and 13 other directories.

jboss-osgi-commits at lists.jboss.org jboss-osgi-commits at lists.jboss.org
Wed Jan 20 09:28:01 EST 2010


Author: thomas.diesler at jboss.com
Date: 2010-01-20 09:27:59 -0500 (Wed, 20 Jan 2010)
New Revision: 99658

Removed:
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintContext.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintException.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/container/
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintContextImpl.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintExtender.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintInterceptor.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintProcessor.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintException.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/JBossXBParser.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/SchemaResolverParser.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/xb/
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/reflect/
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/osgi/framework/
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/osgi/service/blueprint/container/
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/osgi/service/blueprint/reflect/
   projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/AbstractParserTestCase.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicBeansParserTestCase.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BlueprintContainerParserTestCase.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/RootElementParserTestCase.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/common/
Modified:
   projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
   projects/jboss-osgi/trunk/pom.xml
   projects/jboss-osgi/trunk/reactor/blueprint/pom.xml
   projects/jboss-osgi/trunk/reactor/blueprint/scripts/assembly-bundles.xml
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintActivator.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java
   projects/jboss-osgi/trunk/reactor/blueprint/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
   projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
   projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml
   projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
[JBOSGI-263] Integrate Aries Blueprint implementation

Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml	2010-01-20 14:27:59 UTC (rev 99658)
@@ -235,9 +235,9 @@
         <include name="jboss-osgi-jndi.jar" />
         <include name="org.apache.felix.eventadmin.jar" />
         <!-- web -->
+        <include name="jboss-osgi-webconsole.jar" />
         <include name="org.apache.felix.configadmin.jar" />
         <include name="org.apache.felix.metatype.jar" />
-        <include name="jboss-osgi-webconsole.jar" />
         <include name="pax-web-jetty-bundle.jar" />
         <!-- all -->
         <include name="jboss-osgi-apache-xerces.jar" />
@@ -247,6 +247,8 @@
         <include name="jboss-osgi-jta.jar" />
         <include name="jboss-osgi-reflect.jar" />
         <include name="jboss-osgi-xml-binding.jar" />
+        <include name="org.apache.aries.blueprint.jar" />
+        <include name="org.apache.aries.util.jar" />
       </fileset>
 
       <!-- Felix Integration -->
@@ -392,8 +394,10 @@
         <include name="jboss-osgi-webconsole.jar" />
         <include name="jboss-osgi-reflect.jar" />
         <include name="jboss-osgi-xml-binding.jar" />
+        <include name="org.apache.aries.blueprint.jar" />
+        <include name="org.apache.aries.util.jar" />
+        <include name="org.apache.felix.log.jar" />
         <include name="pax-web-jetty-bundle.jar" />
-        <include name="org.apache.felix.log.jar" />
       </fileset>
       <fileset dir="@{deploy.artifacts.dir}/resources/jbossas" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/osgi" override="true">
         <include name="jta-service-jboss-beans.xml" />

Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/pom.xml	2010-01-20 14:27:59 UTC (rev 99658)
@@ -34,7 +34,7 @@
     <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi/trunk</developerConnection>
     <url>http://fisheye.jboss.com/qsearch/JBossOSGi</url>
   </scm>
-  
+
   <!-- Modules -->
   <modules>
     <module>reactor</module>
@@ -44,6 +44,8 @@
   <!-- Properties -->
   <properties>
     <version.apache.ant>1.7.0</version.apache.ant>
+    <version.apache.aries.blueprint>1.0.0-incubating-SNAPSHOT</version.apache.aries.blueprint>
+    <version.apache.aries.util>1.0.0-incubating-SNAPSHOT</version.apache.aries.util>
     <version.apache.felix.configadmin>1.2.4</version.apache.felix.configadmin>
     <version.apache.felix.core>1.4.0</version.apache.felix.core>
     <version.apache.felix.eventadmin>1.0.0</version.apache.felix.eventadmin>
@@ -51,7 +53,7 @@
     <version.apache.felix.metatype>1.0.2</version.apache.felix.metatype>
     <version.izpack>4.3.1</version.izpack>
     <version.jboss.osgi.apache.xerces>2.9.1.SP3</version.jboss.osgi.apache.xerces>
-    <version.jboss.osgi.blueprint>1.0.0.Alpha3</version.jboss.osgi.blueprint>
+    <version.jboss.osgi.blueprint>1.0.0.Beta1</version.jboss.osgi.blueprint>
     <version.jboss.osgi.common>1.0.3</version.jboss.osgi.common>
     <version.jboss.osgi.common.core>2.2.13.GA</version.jboss.osgi.common.core>
     <version.jboss.osgi.deployment>1.0.1-SNAPSHOT</version.jboss.osgi.deployment>
@@ -73,7 +75,7 @@
     <version.jboss.osgi.xml.binding>2.0.2-SNAPSHOT</version.jboss.osgi.xml.binding>
     <version.ops4j.pax.web>0.7.2</version.ops4j.pax.web>
     <version.osgi>4.2.0</version.osgi>
-    
+
     <surefire.memory.args>-Xmx512m</surefire.memory.args>
     <surefire.jpda.args></surefire.jpda.args>
     <surefire.profiler.args></surefire.profiler.args>
@@ -82,14 +84,26 @@
   <!-- DependencyManagement -->
   <dependencyManagement>
     <dependencies>
-    
+
       <!-- apache ant -->
       <dependency>
         <groupId>org.apache.ant</groupId>
         <artifactId>ant</artifactId>
         <version>${version.apache.ant}</version>
       </dependency>
-      
+
+      <!-- apache aries -->
+      <dependency>
+        <groupId>org.apache.aries.blueprint</groupId>
+        <artifactId>org.apache.aries.blueprint</artifactId>
+        <version>${version.apache.aries.blueprint}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.aries</groupId>
+        <artifactId>org.apache.aries.util</artifactId>
+        <version>${version.apache.aries.util}</version>
+      </dependency>
+
       <!-- jboss.osgi -->
       <dependency>
         <groupId>org.jboss.osgi</groupId>
@@ -248,7 +262,7 @@
         <artifactId>pax-web-jetty-bundle</artifactId>
         <version>${version.ops4j.pax.web}</version>
       </dependency>
-      
+
       <!-- org.osgi -->
       <dependency>
         <groupId>org.osgi</groupId>
@@ -276,7 +290,7 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
-  
+
   <!-- Repositories -->
   <repositories>
     <repository>
@@ -339,7 +353,7 @@
         <surefire.jpda.args>-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</surefire.jpda.args>
       </properties>
     </profile>
-    
+
     <!--
       Name: yourkit
       Descr: Enable YourKit remote profiling
@@ -355,7 +369,7 @@
         <surefire.profiler.args>-agentlib:yjpagent=onexit=memory</surefire.profiler.args>
       </properties>
     </profile>
-    
+
     <!--
       Name: embedded-testing 
       Descr: Setup for embedded integration testing
@@ -407,7 +421,7 @@
         </plugins>
       </build>
     </profile>
-    
+
     <!--
       Name: remote-testing 
       Descr: Setup for remote integration testing
@@ -479,7 +493,7 @@
         </plugins>
       </build>
     </profile>
-    
+
   </profiles>
 
 </project>

Modified: projects/jboss-osgi/trunk/reactor/blueprint/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/pom.xml	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/pom.xml	2010-01-20 14:27:59 UTC (rev 99658)
@@ -20,7 +20,7 @@
   <artifactId>jboss-osgi-blueprint</artifactId>
   <packaging>bundle</packaging>
 
-  <version>1.0.0.Alpha3</version>
+  <version>1.0.0.Beta1</version>
 
   <!-- Parent -->
   <parent>
@@ -37,31 +37,21 @@
   <!-- Dependencies -->
   <dependencies>
     <dependency>
-      <groupId>org.jboss.osgi.runtime</groupId>
-      <artifactId>jboss-osgi-deployment</artifactId>
+      <groupId>biz.aQute</groupId>
+      <artifactId>bnd</artifactId>
     </dependency>
-
-    <!-- Provided Dependencies -->
+  
+    <!-- Compile Dependencies -->
     <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.log</artifactId>
-      <scope>provided</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.felix</groupId>
-          <artifactId>org.osgi.core</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.felix</groupId>
-          <artifactId>org.osgi.compendium</artifactId>
-        </exclusion>
-      </exclusions>
+      <groupId>org.apache.aries.blueprint</groupId>
+      <artifactId>org.apache.aries.blueprint</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.jboss.osgi.bundles</groupId>
-      <artifactId>jboss-osgi-apache-xerces</artifactId>
-      <scope>provided</scope>
+      <groupId>org.apache.aries</groupId>
+      <artifactId>org.apache.aries.util</artifactId>
     </dependency>
+    
+    <!-- Provided Dependencies -->
     <dependency>
       <groupId>org.jboss.osgi.bundles</groupId>
       <artifactId>jboss-osgi-common</artifactId>
@@ -69,35 +59,15 @@
     </dependency>
     <dependency>
       <groupId>org.jboss.osgi.bundles</groupId>
-      <artifactId>jboss-osgi-common-core</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.osgi.bundles</groupId>
       <artifactId>jboss-osgi-husky</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.jboss.osgi.bundles</groupId>
-      <artifactId>jboss-osgi-jaxb</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.osgi.bundles</groupId>
       <artifactId>jboss-osgi-jmx</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>
-      <groupId>org.jboss.osgi.bundles</groupId>
-      <artifactId>jboss-osgi-reflect</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.osgi.bundles</groupId>
-      <artifactId>jboss-osgi-xml-binding</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
       <groupId>org.jboss.osgi.runtime</groupId>
       <artifactId>jboss-osgi-framework</artifactId>
       <scope>provided</scope>
@@ -137,33 +107,13 @@
               org.jboss.osgi.blueprint.*
             </Private-Package>
             <Export-Package>
-              org.jboss.osgi.blueprint;version=1.0.0,
-              org.osgi.service.blueprint.*;version=1.0
+              org.jboss.osgi.blueprint;version=${version},
             </Export-Package>
             <Import-Package>
-              javax.xml.bind.annotation,
-              javax.xml.namespace,
-              org.apache.xerces.dom,
-              org.jboss.beans.metadata*,
-              org.jboss.dependency.spi,
-              org.jboss.kernel.spi*,
-              org.jboss.osgi.deployment.interceptor,
-              org.jboss.osgi.jbossxb;version=2.0,
-              org.jboss.osgi.microcontainer;version=1.0,
-              org.jboss.osgi.spi;version=1.0,
               org.jboss.osgi.spi.capability;version=1.0,
-              org.jboss.osgi.spi.service;version=1.0,
-              org.jboss.osgi.spi.util;version=1.0,
-              org.jboss.reflect.spi,
-              org.jboss.xb.annotations,
               org.osgi.framework,
               org.osgi.service.blueprint.container;version=1.0,
               org.osgi.service.blueprint.reflect;version=1.0,
-              org.osgi.service.log;version=1.3,
-              org.osgi.util.tracker;version=1.4,
-              org.slf4j;version="[1.5,2.0)",
-              org.w3c.dom,
-              org.xml.sax,
             </Import-Package>
           </instructions>
         </configuration>

Modified: projects/jboss-osgi/trunk/reactor/blueprint/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/scripts/assembly-bundles.xml	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/scripts/assembly-bundles.xml	2010-01-20 14:27:59 UTC (rev 99658)
@@ -14,16 +14,22 @@
       <outputDirectory>bundles</outputDirectory>
       <outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
       <includes>
-        <include>*:jboss-osgi-apache-xerces:jar</include>
+        <include>*:org.apache.aries.blueprint:jar</include>
+        <include>*:org.apache.aries.util:jar</include>
+      </includes>
+      <useStrictFiltering>true</useStrictFiltering>
+      <scope>compile</scope>
+      <unpack>false</unpack>
+    </dependencySet>
+    <dependencySet>
+      <outputDirectory>bundles</outputDirectory>
+      <outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+      <includes>
         <include>*:jboss-osgi-common:jar</include>
         <include>*:jboss-osgi-common-core:jar</include>
-        <include>*:jboss-osgi-deployment:jar</include>
         <include>*:jboss-osgi-husky:jar</include>
-        <include>*:jboss-osgi-jaxb:jar</include>
         <include>*:jboss-osgi-jmx:jar</include>
         <include>*:jboss-osgi-jndi:jar</include>
-        <include>*:jboss-osgi-reflect:jar</include>
-        <include>*:jboss-osgi-xml-binding:jar</include>
       </includes>
       <useStrictFiltering>true</useStrictFiltering>
       <scope>provided</scope>

Modified: projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -23,9 +23,7 @@
 
 //$Id$
 
-import org.jboss.osgi.jbossxb.XMLBindingCapability;
 import org.jboss.osgi.spi.capability.Capability;
-import org.jboss.osgi.testing.OSGiRuntime;
 
 /**
  * Adds the Blueprint capability to the {@link OSGiRuntime}
@@ -33,7 +31,7 @@
  * 
  * It is ignored if the {@link BlueprintService} is already registered.
  * 
- * Installed bundles: jboss-osgi-blueprint.jar  
+ * Installed bundles: jboss-osgi-blueprint.jar, org.apache.aries.blueprint.jar  
  * 
  * @author thomas.diesler at jboss.com
  * @since 05-May-2009
@@ -42,10 +40,10 @@
 {
    public BlueprintCapability()
    {
-      super (BlueprintService.class.getName());
-      
-      addDependency(new XMLBindingCapability());
-      
+      super(BlueprintService.class.getName());
+
       addBundle("bundles/jboss-osgi-blueprint.jar");
+      addBundle("bundles/org.apache.aries.util.jar");
+      addBundle("bundles/org.apache.aries.blueprint.jar");
    }
 }
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintContext.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintContext.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintContext.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.blueprint;
-
-//$Id$
-
-import org.jboss.osgi.blueprint.parser.BlueprintParser;
-import org.osgi.framework.BundleContext;
-
-/**
- * The context of the Blueprint implementation
- * 
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public interface BlueprintContext 
-{
-   String XMLNS_BLUEPRINT = "http://www.osgi.org/xmlns/blueprint/v1.0.0";
-   
-   BundleContext getBundleContext();
-
-   BlueprintParser getBlueprintParser();
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintException.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintException.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/BlueprintException.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.blueprint;
-
-//$Id$
-
-/**
- * The Blueprint implementation throws this exception on various 
- * error conditions. 
- * 
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public class BlueprintException extends RuntimeException 
-{
-   private static final long serialVersionUID = 1L;
-   
-   public BlueprintException(String message, Throwable cause)
-   {
-      super(message, cause);
-   }
-
-   public BlueprintException(String message)
-   {
-      super(message);
-   }
-
-   public BlueprintException(Throwable cause)
-   {
-      super(cause);
-   }
-}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintActivator.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintActivator.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintActivator.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -26,47 +26,23 @@
 import org.jboss.osgi.blueprint.BlueprintService;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleListener;
 
 /**
- * The Blueprint activator registeres the {@link BlueprintExtender} 
- * as {@link BundleListener}
+ * The Blueprint activator registeres the {@link BlueprintService} 
  * 
  * @author thomas.diesler at jboss.com
  * @since 13-May-2009
  */
 public class BlueprintActivator implements BundleActivator
 {
-   private BlueprintExtender extender;
-   private BlueprintInterceptor interceptor;
-   
    public void start(BundleContext context) throws Exception
    {
       // Register the marker service
       BlueprintService service = new BlueprintService(){};
       context.registerService(BlueprintService.class.getName(), service, null);
-      
-      BlueprintProcessor processor = new BlueprintProcessor(new BlueprintContextImpl(context));
-      
-      interceptor = new BlueprintInterceptor(processor);
-      interceptor.start();
-      
-      extender = new BlueprintExtender(processor);
-      extender.start();
    }
 
    public void stop(BundleContext context) throws Exception
    {
-      if (interceptor != null)
-      {
-         interceptor.stop();
-         interceptor = null;
-      }
-      
-      if (extender != null)
-      {
-         extender.stop();
-         extender = null;
-      }
    }
 }
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintContextImpl.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintContextImpl.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintContextImpl.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.blueprint.extender;
-
-//$Id$
-
-import org.jboss.osgi.blueprint.BlueprintContext;
-import org.jboss.osgi.blueprint.parser.BlueprintParser;
-import org.osgi.framework.BundleContext;
-
-/**
- * The context of the Blueprint implementation
- * 
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public class BlueprintContextImpl implements BlueprintContext
-{
-   public static final String XMLNS_BLUEPRINT = "http://www.osgi.org/xmlns/blueprint/v1.0.0";
-   
-   private BundleContext context;
-   private BlueprintParser parser;
-   
-   public BlueprintContextImpl(BundleContext context)
-   {
-      this.context = context;
-      
-      this.parser = new BlueprintParser(this);
-   }
-
-   public BundleContext getBundleContext()
-   {
-      return context;
-   }
-
-   public BlueprintParser getBlueprintParser()
-   {
-      return parser;
-   }
-
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintExtender.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintExtender.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintExtender.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.blueprint.extender;
-
-//$Id$
-
-import org.jboss.osgi.blueprint.BlueprintContext;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleEvent;
-import org.osgi.framework.SynchronousBundleListener;
-
-/**
- * The Blueprint extender
- * 
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public class BlueprintExtender implements SynchronousBundleListener
-{
-   private BlueprintProcessor processor;
-   
-   public BlueprintExtender(BlueprintProcessor processor)
-   {
-      this.processor = processor;
-   }
-
-   /**
-    * Start the BlueprintExtender
-    */
-   public void start()
-   {
-      BlueprintContext bpContext = processor.getBlueprintContext();
-      bpContext.getBundleContext().addBundleListener(this);
-   }
-   
-   /**
-    * Stop the BlueprintExtender
-    */
-   public void stop()
-   {
-      BlueprintContext bpContext = processor.getBlueprintContext();
-      bpContext.getBundleContext().removeBundleListener(this);
-      processor.stopAllContainers();
-   }
-
-   /**
-    * Handle the bundle event
-    */
-   public void bundleChanged(BundleEvent event)
-   {
-      Bundle bundle = event.getBundle();
-      
-      int eventType = event.getType();
-      if (eventType == BundleEvent.STARTING)
-      {
-         if (processor.hasContainer(bundle) == false)
-            processor.createContainer(bundle);
-      }
-      else if (eventType == BundleEvent.STOPPED)
-      {
-         if (processor.hasContainer(bundle))
-            processor.stopContainer(bundle);
-      }
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintInterceptor.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintInterceptor.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintInterceptor.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,80 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.blueprint.extender;
-
-//$Id$
-
-import org.jboss.osgi.blueprint.BlueprintContext;
-import org.jboss.osgi.deployment.interceptor.AbstractLifecycleInterceptor;
-import org.jboss.osgi.deployment.interceptor.InvocationContext;
-import org.jboss.osgi.deployment.interceptor.LifecycleInterceptor;
-import org.jboss.osgi.deployment.interceptor.LifecycleInterceptorException;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The Blueprint interceptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 20-Oct-2009
- */
-public class BlueprintInterceptor extends AbstractLifecycleInterceptor implements LifecycleInterceptor
-{
-   // Provide logging
-   private Logger log = LoggerFactory.getLogger(BlueprintInterceptor.class);
-   
-   private BlueprintProcessor processor;
-   
-   public BlueprintInterceptor(BlueprintProcessor processor)
-   {
-      this.processor = processor;
-   }
-
-   public void start()
-   {
-      BlueprintContext bpContext = processor.getBlueprintContext();
-      BundleContext context = bpContext.getBundleContext();
-      context.registerService(LifecycleInterceptor.class.getName(), this, null);
-   }
-   
-   public void stop()
-   {
-      processor.stopAllContainers();
-   }
-
-   public void invoke(int state, InvocationContext context) throws LifecycleInterceptorException
-   {
-      Bundle bundle = context.getBundle();
-      if (state == Bundle.STARTING)
-      {
-         log.debug("Create blueprint container");
-         processor.createContainer(bundle);
-      }
-      else if (state == Bundle.STOPPING)
-      {
-         log.debug("Stop blueprint container");
-         processor.stopContainer(bundle);
-      }
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintProcessor.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintProcessor.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintProcessor.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,116 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.blueprint.extender;
-
-//$Id$
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.osgi.blueprint.BlueprintContext;
-import org.jboss.osgi.blueprint.container.BlueprintContainerImpl;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.Constants;
-
-/**
- * The Blueprint metadata processor
- * 
- * @author thomas.diesler at jboss.com
- * @since 20-Oct-2009
- */
-class BlueprintProcessor
-{
-   private BlueprintContext bpContext;
-   private Map<String, BlueprintContainerImpl> containers = new LinkedHashMap<String, BlueprintContainerImpl>();
-
-   public BlueprintProcessor(BlueprintContext bpContext)
-   {
-      this.bpContext = bpContext;
-   }
-
-   public BlueprintContext getBlueprintContext()
-   {
-      return bpContext;
-   }
-
-   @SuppressWarnings("unchecked")
-   protected void createContainer(Bundle bundle)
-   {
-      // If a Bundle-Blueprint manifest header is defined, then this header contains a list of paths. 
-      // If this header is not defined, then resources ending in .xml in the bundle’s
-      // OSGI-INF/blueprint directory must be used. These are the resources that
-      // would be found by calling the Bundle findEntries("OSGI-INF/blueprint", "*.xml", false) method.
-
-      boolean hasBlueprintMetadata = false;
-
-      String descriptorPaths = (String)bundle.getHeaders().get(BlueprintContainerImpl.HEADER_BUNDLE_BLUEPRINT);
-      hasBlueprintMetadata = (descriptorPaths != null);
-
-      Enumeration foundEntries = bundle.findEntries("OSGI-INF/blueprint", "*.xml", false);
-      hasBlueprintMetadata |= (foundEntries != null);
-
-      if (hasBlueprintMetadata)
-      {
-         BlueprintContainerImpl container = new BlueprintContainerImpl(bpContext, bundle);
-         container.initialize();
-
-         String key = getBundleKey(bundle);
-         containers.put(key, container);
-      }
-   }
-
-   protected boolean hasContainer(Bundle bundle)
-   {
-      String key = getBundleKey(bundle);
-      return containers.containsKey(key);
-   }
-   
-   protected void stopContainer(Bundle bundle)
-   {
-      String key = getBundleKey(bundle);
-      BlueprintContainerImpl container = containers.remove(key);
-      if (container != null)
-         container.shutdown();
-   }
-
-   protected void stopAllContainers()
-   {
-      Collection<BlueprintContainerImpl> values = containers.values();
-      List<BlueprintContainerImpl> list = new ArrayList<BlueprintContainerImpl>(values);
-      Collections.reverse(list);
-
-      for (BlueprintContainerImpl container : list)
-         container.shutdown();
-   }
-
-   private String getBundleKey(Bundle bundle)
-   {
-      String symbolicName = bundle.getSymbolicName();
-      String version = (String)bundle.getHeaders().get(Constants.BUNDLE_VERSION);
-      return symbolicName + "-" + version;
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintException.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintException.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintException.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.blueprint.parser;
-
-//$Id$
-
-/**
- * The Blueprint implementation throws this exception on various 
- * error conditions. 
- * 
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public class BlueprintException extends RuntimeException 
-{
-   private static final long serialVersionUID = 1L;
-   
-   public BlueprintException(String message, Throwable cause)
-   {
-      super(message, cause);
-   }
-
-   public BlueprintException(String message)
-   {
-      super(message);
-   }
-
-   public BlueprintException(Throwable cause)
-   {
-      super(cause);
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,109 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.blueprint.parser;
-
-import static org.jboss.osgi.blueprint.container.BlueprintContainerImpl.HEADER_BUNDLE_BLUEPRINT;
-
-import java.net.URL;
-import java.util.Enumeration;
-
-import org.jboss.osgi.blueprint.BlueprintContext;
-import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
-import org.jboss.osgi.blueprint.reflect.BlueprintMetadata;
-import org.osgi.framework.Bundle;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-//$Id$
-
-/**
- * The Blueprint descriptor parser.
- * 
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public class BlueprintParser
-{
-   // Provide Logging
-   private Logger log = LoggerFactory.getLogger(BlueprintParser.class);
-   
-   private BlueprintContext context;
-   private JBossXBParser parser;
-   
-   public BlueprintParser(BlueprintContext context)
-   {
-      this.context = context;
-      this.parser = new SchemaResolverParser(context);
-   }
-   
-   @SuppressWarnings("unchecked")
-   public BlueprintMetadata getBlueprintMetadata(Bundle bundle)
-   {
-      TBlueprint tBlueprint = null;
-
-      // If a Bundle-Blueprint manifest header is defined, then this header contains a list of paths. 
-      // If this header is not defined, then resources ending in .xml in the bundle’s
-      // OSGI-INF/blueprint directory must be used. These are the resources that
-      // would be found by calling the Bundle findEntries("OSGI-INF/blueprint", "*.xml", false) method.
-
-      String descriptorPaths = (String)bundle.getHeaders().get(HEADER_BUNDLE_BLUEPRINT);
-      if (descriptorPaths != null)
-      {
-         log.info(HEADER_BUNDLE_BLUEPRINT + ": " + descriptorPaths + " in bundle: " + bundle);
-         String[] descritors = descriptorPaths.split(", ");
-         
-         for (String descriptor : descritors)
-         {
-            TBlueprint aux = parse(bundle, descriptor);
-            tBlueprint = aux.merge(tBlueprint);
-         }
-      }
-
-      Enumeration<URL> foundEntries = bundle.findEntries("OSGI-INF/blueprint", "*.xml", false);
-      if (foundEntries != null)
-      {
-         while (foundEntries.hasMoreElements())
-         {
-            URL nextEntry = foundEntries.nextElement();
-            TBlueprint aux = parse(nextEntry);
-            tBlueprint = aux.merge(tBlueprint);
-         }
-      }
-      
-      if (tBlueprint == null)
-         throw new IllegalStateException("Cannot obtain blueprint metadata");
-      
-      return new BlueprintMetadata(context, tBlueprint);
-   }
-   
-   public TBlueprint parse(Bundle bundle, String descriptor)
-   {
-      URL descriptorURL = bundle.getResource(descriptor);
-      return parse(descriptorURL);
-   }
-
-   public TBlueprint parse(URL descriptorURL)
-   {
-      TBlueprint blueprint = parser.parse(descriptorURL);
-      return blueprint;
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/JBossXBParser.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/JBossXBParser.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/JBossXBParser.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.blueprint.parser;
-
-//$Id$
-
-import java.net.URL;
-
-import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-
-/**
- * The SchemaBindingParser builds a JBossXB {@link SchemaBinding} from an annotated blueprint.xsd
- * 
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public interface JBossXBParser
-{
-   /*
-    * Parse a blueprint descriptor
-    */
-   public TBlueprint parse(URL xmlURL);
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/SchemaResolverParser.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/SchemaResolverParser.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/SchemaResolverParser.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.blueprint.parser;
-
-//$Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.osgi.blueprint.BlueprintContext;
-import org.jboss.osgi.blueprint.BlueprintException;
-import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
-import org.jboss.osgi.jbossxb.UnmarshallerService;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-/**
- * The Blueprint descriptor parser.
- * 
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public class SchemaResolverParser implements JBossXBParser
-{
-   private BlueprintContext bpContext;
-
-   public SchemaResolverParser(BlueprintContext bpContext)
-   {
-      this.bpContext = bpContext;
-   }
-
-   /*
-    * Parse a blueprint descriptor
-    */
-   public TBlueprint parse(URL xmlURL)
-   {
-      if (xmlURL == null)
-         throw new IllegalArgumentException("Cannot parse null descriptor URL");
-
-      BundleContext context = bpContext.getBundleContext();
-      ServiceReference sref = context.getServiceReference(UnmarshallerService.class.getName());
-      if (sref == null)
-         throw new IllegalStateException("Cannot obtain: " + UnmarshallerService.class.getName());
-
-      UnmarshallerService unmarshaller = (UnmarshallerService)context.getService(sref);
-      try
-      {
-         unmarshaller.setSchemaValidation(true);
-         unmarshaller.setNamespaceAware(true);
-         unmarshaller.setValidation(true);
-
-         unmarshaller.registerSchemaLocation("http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd", "schema/blueprint.xsd");
-
-         unmarshaller.addClassBinding(BlueprintContext.XMLNS_BLUEPRINT, TBlueprint.class);
-
-         TBlueprint tBlueprint = (TBlueprint)unmarshaller.unmarshal(xmlURL.toExternalForm());
-
-         return tBlueprint;
-      }
-      catch (IOException ex)
-      {
-         throw new BlueprintException("Cannot parse blueprint descriptor: " + xmlURL, ex);
-      }
-   }
-}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -190,7 +190,7 @@
       Set<String> compNames = bpContainer.getComponentIds();
 
       assertNotNull("ComponentNames not null", compNames);
-      assertEquals("ComponentNames size", 4, compNames.size());
+      assertEquals("ComponentNames size", 8, compNames.size());
       assertTrue("ComponentNames contains beanA", compNames.contains("beanA"));
       assertTrue("ComponentNames contains serviceA", compNames.contains("serviceA"));
       assertTrue("ComponentNames contains serviceB", compNames.contains("serviceB"));
@@ -209,7 +209,7 @@
       Collection<BeanMetadata> bcMetadata = bpContainer.getMetadata(BeanMetadata.class);
       
       assertNotNull("BeanComponentsMetadata not null", bcMetadata);
-      assertEquals("BeanComponentsMetadata size", 1, bcMetadata.size());
+      assertEquals("BeanComponentsMetadata size", 2, bcMetadata.size());
       
       BeanMetadata bmd = bcMetadata.iterator().next();
       assertEquals("beanA", bmd.getId());

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/AbstractParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/AbstractParserTestCase.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/AbstractParserTestCase.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,65 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.osgi.blueprint.parser;
-
-//$Id$
-
-import java.net.URL;
-
-import org.jboss.osgi.blueprint.BlueprintContext;
-import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
-import org.jboss.osgi.testing.OSGiTest;
-import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
-
-/**
- * An abstract Blueprint parser
- * 
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public abstract class AbstractParserTestCase extends OSGiTest
-{
-   protected TBlueprint parse(URL xmlURL) throws JBossXBException
-   {
-      if (xmlURL == null)
-         throw new IllegalArgumentException("Cannot parse null descriptor URL");
-
-      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
-      unmarshaller.setSchemaValidation(true);
-      unmarshaller.setNamespaceAware(true);
-      unmarshaller.setValidation(true);
-
-      JBossEntityResolver entityResolver = new JBossEntityResolver();
-      entityResolver.registerLocalEntity("http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd", "schema/blueprint.xsd");
-      unmarshaller.setEntityResolver(entityResolver);
-
-      DefaultSchemaResolver schemaBindingResolver = new DefaultSchemaResolver();
-      schemaBindingResolver.addClassBinding(BlueprintContext.XMLNS_BLUEPRINT, TBlueprint.class);
-
-      TBlueprint tBlueprint = (TBlueprint)unmarshaller.unmarshal(xmlURL.toExternalForm(), schemaBindingResolver);
-      return tBlueprint;
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,131 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.osgi.blueprint.parser;
-
-//$Id$
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.net.URL;
-import java.util.Collection;
-import java.util.List;
-
-import org.jboss.osgi.blueprint.parser.xb.TActivation;
-import org.jboss.osgi.blueprint.parser.xb.TAvailability;
-import org.jboss.osgi.blueprint.parser.xb.TBean;
-import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
-import org.jboss.osgi.blueprint.parser.xb.TRef;
-import org.jboss.osgi.blueprint.parser.xb.TReference;
-import org.jboss.osgi.blueprint.parser.xb.TService;
-import org.jboss.osgi.blueprint.parser.xb.TServiceReference;
-import org.jboss.osgi.blueprint.parser.xb.TTypeConverters;
-import org.jboss.osgi.testing.OSGiTestHelper;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * Blueprint parser tests
- * 
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public class AllElementsParserTestCase extends AbstractParserTestCase
-{
-   private static TBlueprint blueprint;
-
-   @BeforeClass
-   public static void beforeClass() throws Exception
-   {
-      URL xmlURL = new OSGiTestHelper().getResourceURL("parser/blueprint-all-elements.xml");
-      blueprint = new AllElementsParserTestCase().parse(xmlURL);
-   }
-
-   @Test
-   public void testRootAttributes() throws Exception
-   {
-      TAvailability defaultAvailability = blueprint.getDefaultAvailability();
-      assertEquals(TAvailability.mandatory, defaultAvailability);
-      
-      TActivation defaultActivation = blueprint.getDefaultActivation();
-      assertEquals(TActivation.eager, defaultActivation);
-      
-      long defaultTimeout = blueprint.getDefaultTimeout().longValue();
-      assertEquals(300000, defaultTimeout);
-   }
-
-   @Test
-   public void getDescription() throws Exception
-   {
-      String description = blueprint.getDescription();
-      assertEquals("blueprint description", description);
-   }
-
-   @Test
-   public void getTypeConverters() throws Exception
-   {
-      TTypeConverters typeConverters = blueprint.getTypeConverters();
-      assertNotNull("TypeConverters not null", typeConverters);
-      
-      List<Object> converters = typeConverters.getComponents();
-      assertEquals("TypeConverters size", 5, converters.size());
-      
-      TBean conv1 = (TBean)converters.get(0);
-      assertNotNull("Converter not null", conv1);
-      
-      TReference conv2 = (TReference)converters.get(1);
-      assertNotNull("Converter not null", conv2);
-      
-      TReference conv3 = (TReference)converters.get(2);
-      assertNotNull("Converter not null", conv3);
-      
-      TRef conv4 = (TRef)converters.get(3);
-      assertNotNull("Converter not null", conv4);
-      
-      TRef conv5 = (TRef)converters.get(4);
-      assertNotNull("Converter not null", conv5);
-   }
-
-   @Test
-   public void getExportedServicesMetadata() throws Exception
-   {
-      Collection<TService> services = blueprint.getMetadata(TService.class);
-      assertNotNull("ServiceMetadata not null", services);
-      assertEquals("ServiceMetadata size", 2, services.size());
-   }
-
-   @Test
-   public void getReferencedServicesMetadata() throws Exception
-   {
-      Collection<TServiceReference> serviceRefs = blueprint.getMetadata(TServiceReference.class);
-      assertNotNull("ServiceReferenceMetadata not null", serviceRefs);
-      assertEquals("ServiceReferenceMetadata size", 2, serviceRefs.size());
-   }
-
-   @Test
-   public void getBeanComponentsMetadata() throws Exception
-   {
-      Collection<TBean> beans = blueprint.getMetadata(TBean.class);
-      assertNotNull("BeanMetadata not null", beans);
-      assertEquals("BeanMetadata size", 3, beans.size());
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicBeansParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicBeansParserTestCase.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicBeansParserTestCase.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.osgi.blueprint.parser;
-
-//$Id$
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.List;
-
-import org.jboss.osgi.blueprint.parser.xb.TBean;
-import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
-import org.jboss.osgi.blueprint.parser.xb.TComponent;
-import org.jboss.test.osgi.blueprint.parser.common.BeanA;
-import org.jboss.test.osgi.blueprint.parser.common.BeanB;
-import org.junit.Test;
-
-/**
- * Blueprint parser tests
- * 
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public class BasicBeansParserTestCase extends AbstractParserTestCase
-{
-   @Test
-   public void testBasicBeans() throws Exception
-   {
-      TBlueprint blueprint = parse(getResourceURL("parser/blueprint-basic-beans.xml"));
-
-      List<TComponent> compList = blueprint.getComponents();
-      assertTrue(compList.size() > 0);
-
-      TBean beanA = (TBean)compList.get(0);
-      assertEquals(BeanA.class.getName(), beanA.getClassName());
-      assertEquals("beanA", beanA.getId());
-      assertEquals("BeanA Description", beanA.getDescription());
-
-      TBean beanB = (TBean)compList.get(1);
-      assertEquals(BeanB.class.getName(), beanB.getClassName());
-      assertEquals("beanB", beanB.getId());
-      assertEquals("BeanB Description", beanB.getDescription());
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,74 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.osgi.blueprint.parser;
-
-//$Id$
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.List;
-
-import org.jboss.osgi.blueprint.parser.xb.TBean;
-import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
-import org.jboss.osgi.blueprint.parser.xb.TComponent;
-import org.jboss.osgi.blueprint.parser.xb.TService;
-import org.jboss.test.osgi.blueprint.parser.common.BeanA;
-import org.jboss.test.osgi.blueprint.parser.common.ServiceA;
-import org.jboss.test.osgi.blueprint.parser.common.ServiceB;
-import org.junit.Test;
-
-/**
- * Blueprint parser tests
- * 
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public class BasicServiceParserTestCase extends AbstractParserTestCase
-{
-   @Test
-   public void testBasicService() throws Exception
-   {
-      TBlueprint blueprint = parse(getResourceURL("parser/blueprint-basic-service.xml"));
-
-      List<TComponent> compList = blueprint.getComponents();
-      assertTrue(compList.size() > 0);
-
-      TBean beanA = (TBean)compList.get(0);
-      assertEquals(BeanA.class.getName(), beanA.getClassName());
-      assertEquals("beanA", beanA.getId());
-
-      TService serviceA = (TService)compList.get(1);
-      assertEquals("serviceA", serviceA.getId());
-
-      List<String> intfsA = serviceA.getInterfaces().getValues();
-      assertTrue(intfsA.size() > 0);
-      assertEquals(ServiceA.class.getName(), intfsA.get(0));
-
-      TService serviceB = (TService)compList.get(2);
-      assertEquals("serviceB", serviceB.getId());
-
-      List<String> intfsB = serviceB.getInterfaces().getValues();
-      assertTrue(intfsB.size() > 0);
-      assertEquals(ServiceB.class.getName(), intfsB.get(0));
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BlueprintContainerParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BlueprintContainerParserTestCase.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BlueprintContainerParserTestCase.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,126 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.osgi.blueprint.parser;
-
-//$Id$
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.net.URL;
-import java.util.List;
-
-import javax.management.MBeanServer;
-
-import org.jboss.osgi.blueprint.parser.xb.TBean;
-import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
-import org.jboss.osgi.blueprint.parser.xb.TProperty;
-import org.jboss.osgi.blueprint.parser.xb.TReference;
-import org.jboss.osgi.blueprint.parser.xb.TService;
-import org.jboss.osgi.testing.OSGiTestHelper;
-import org.jboss.test.osgi.blueprint.container.bundle.BeanA;
-import org.jboss.test.osgi.blueprint.container.bundle.BeanB;
-import org.jboss.test.osgi.blueprint.container.bundle.ServiceA;
-import org.jboss.test.osgi.blueprint.container.bundle.ServiceB;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * Blueprint parser tests
- * 
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public class BlueprintContainerParserTestCase extends AbstractParserTestCase
-{
-   private static TBlueprint blueprint;
-
-   @BeforeClass
-   public static void beforeClass() throws Exception
-   {
-      URL xmlURL = new OSGiTestHelper().getResourceURL("container/OSGI-INF/blueprint/basic-service.xml");
-      blueprint = new BlueprintContainerParserTestCase().parse(xmlURL);
-   }
-
-   @Test
-   public void getBeanMetadata() throws Exception
-   {
-      List<TBean> beans = blueprint.getMetadata(TBean.class);
-      assertNotNull("TBeans not null", beans);
-      assertEquals("TBeans size", 1, beans.size());
-      
-      TBean bean = beans.get(0);
-      assertNotNull("TBean not null", bean);
-      assertEquals(BeanA.class.getName(), bean.getClassName());
-      
-      List<TProperty> props = bean.getProperties();
-      assertNotNull("TProperties not null", props);
-      assertEquals("TProperties size", 1, props.size());
-      
-      TProperty prop = props.get(0);
-      assertNotNull("TProperty not null", prop);
-      assertEquals("mbeanServer", prop.getName());
-      assertEquals("mbeanService", prop.getRef());
-   }
-
-   @Test
-   public void getServiceMetadata() throws Exception
-   {
-      List<TService> services = blueprint.getMetadata(TService.class);
-      assertNotNull("TServices not null", services);
-      assertEquals("TServices size", 2, services.size());
-      
-      TService serviceA = services.get(0);
-      assertEquals("serviceA", serviceA.getId());
-      assertEquals("beanA", serviceA.getRef());
-      assertEquals(ServiceA.class.getName(), serviceA.getInterface());
-      
-      TService serviceB = services.get(1);
-      assertEquals("serviceB", serviceB.getId());
-      assertEquals(ServiceB.class.getName(), serviceB.getInterface());
-      
-      TBean bean = serviceB.getBean();
-      assertNotNull("TBean not null", bean);
-      assertEquals(BeanB.class.getName(), bean.getClassName());
-      
-      List<TProperty> props = bean.getProperties();
-      assertNotNull("TProperties not null", props);
-      assertEquals("TProperties size", 1, props.size());
-      
-      TProperty prop = props.get(0);
-      assertNotNull("TProperty not null", prop);
-      assertEquals("beanA", prop.getName());
-      assertEquals("beanA", prop.getRef());
-   }
-
-   @Test
-   public void getReferenceMetadata() throws Exception
-   {
-      List<TReference> references = blueprint.getMetadata(TReference.class);
-      assertNotNull("TReferences not null", references);
-      assertEquals("TReferences size", 1, references.size());
-      
-      TReference ref = references.get(0);
-      assertEquals("mbeanService", ref.getId());
-      assertEquals(MBeanServer.class.getName(), ref.getInterface());
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/RootElementParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/RootElementParserTestCase.java	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/RootElementParserTestCase.java	2010-01-20 14:27:59 UTC (rev 99658)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.osgi.blueprint.parser;
-
-//$Id$
-
-import static org.junit.Assert.assertEquals;
-
-import java.math.BigInteger;
-
-import org.jboss.osgi.blueprint.parser.xb.TActivation;
-import org.jboss.osgi.blueprint.parser.xb.TAvailability;
-import org.jboss.osgi.blueprint.parser.xb.TBlueprint;
-import org.junit.Test;
-
-/**
- * Blueprint parser tests
- * 
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public class RootElementParserTestCase extends AbstractParserTestCase
-{
-   @Test
-   public void testBlueprintDefaultAttributes() throws Exception
-   {
-      TBlueprint blueprint = parse(getResourceURL("parser/blueprint-root-defaults.xml"));
-      
-      // assert default attributes
-      assertEquals("availability", TAvailability.mandatory, blueprint.getDefaultAvailability());
-      assertEquals("timeout", new BigInteger("300000"), blueprint.getDefaultTimeout());
-      assertEquals("activation", TActivation.eager, blueprint.getDefaultActivation());
-   }
-
-   @Test
-   public void testBlueprintDescription() throws Exception
-   {
-      TBlueprint blueprint = parse(getResourceURL("parser/blueprint-basic-root.xml"));
-      
-      // assert default attributes
-      assertEquals("availability", TAvailability.optional, blueprint.getDefaultAvailability());
-      assertEquals("timeout", new BigInteger("100000"), blueprint.getDefaultTimeout());
-      assertEquals("activation", TActivation.lazy, blueprint.getDefaultActivation());
-      
-      // assert description
-      assertEquals("some text", blueprint.getDescription());
-   }
-}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/reactor/blueprint/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/test/resources/META-INF/jboss-osgi-bootstrap.xml	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/resources/META-INF/jboss-osgi-bootstrap.xml	2010-01-20 14:27:59 UTC (rev 99658)
@@ -12,7 +12,6 @@
     <constructor>
       <parameter><inject bean="jboss.kernel:service=Kernel" /></parameter>
       <parameter><inject bean="MainDeployer" /></parameter>
-      <parameter><inject bean="DeploymentRegistry" /></parameter>
     </constructor>
     <property name="properties">
       <map keyClass="java.lang.String" valueClass="java.lang.String">
@@ -74,6 +73,12 @@
      </list>
     </property>
   </bean>
+  <bean name="OSGiControllerContextPlugin" class="org.jboss.osgi.framework.bundle.ControllerContextPluginImpl">
+    <constructor>
+      <parameter><inject bean="OSGiBundleManager" /></parameter>
+      <parameter><inject bean="DeploymentRegistry" /></parameter>
+    </constructor>
+  </bean>
   <bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>

Modified: projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml	2010-01-20 14:27:59 UTC (rev 99658)
@@ -27,6 +27,8 @@
         <include>*:jboss-osgi-reflect:jar</include>
         <include>*:jboss-osgi-webapp:jar</include>
         <include>*:jboss-osgi-xml-binding:jar</include>
+        <include>*:org.apache.aries.blueprint:jar</include>
+        <include>*:org.apache.aries.util:jar</include>
         <include>*:org.apache.felix.configadmin:jar</include>
         <include>*:org.apache.felix.eventadmin:jar</include>
         <include>*:org.apache.felix.log:jar</include>

Modified: projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml	2010-01-20 14:27:59 UTC (rev 99658)
@@ -26,6 +26,8 @@
         <include>*:jboss-osgi-reflect:jar</include>
         <include>*:jboss-osgi-webapp:jar</include>
         <include>*:jboss-osgi-xml-binding:jar</include>
+        <include>*:org.apache.aries.blueprint:jar</include>
+        <include>*:org.apache.aries.util:jar</include>
         <include>*:org.apache.felix.configadmin:jar</include>
         <include>*:org.apache.felix.eventadmin:jar</include>
         <include>*:org.apache.felix.log:jar</include>

Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml	2010-01-20 13:25:17 UTC (rev 99657)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml	2010-01-20 14:27:59 UTC (rev 99658)
@@ -59,6 +59,11 @@
 
     <!-- Bundle Dependencies -->
     <dependency>
+      <groupId>org.apache.aries.blueprint</groupId>
+      <artifactId>org.apache.aries.blueprint</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.felix</groupId>
       <artifactId>org.apache.felix.log</artifactId>
       <scope>provided</scope>



More information about the jboss-osgi-commits mailing list