JBoss-OSGI SVN: r92831 - projects/jboss-osgi/projects/bundles/common-core/trunk.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-08-26 10:02:02 -0400 (Wed, 26 Aug 2009)
New Revision: 92831
Modified:
projects/jboss-osgi/projects/bundles/common-core/trunk/pom.xml
Log:
Update to jboss-common-core-2.2.13.GA
Modified: projects/jboss-osgi/projects/bundles/common-core/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/common-core/trunk/pom.xml 2009-08-26 14:00:09 UTC (rev 92830)
+++ projects/jboss-osgi/projects/bundles/common-core/trunk/pom.xml 2009-08-26 14:02:02 UTC (rev 92831)
@@ -21,17 +21,17 @@
<artifactId>jboss-osgi-common-core</artifactId>
<packaging>bundle</packaging>
- <version>2.2.11.SP1</version>
+ <version>2.2.13-SNAPSHOT</version>
<!-- Parent -->
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-parent</artifactId>
- <version>1.0.1</version>
+ <version>1.0.2-SNAPSHOT</version>
</parent>
<properties>
- <version.jboss.common.core>2.2.11.SP1</version.jboss.common.core>
+ <version.jboss.common.core>2.2.13.GA</version.jboss.common.core>
</properties>
<dependencies>
16 years, 4 months
JBoss-OSGI SVN: r92830 - in projects/jboss-osgi/trunk: reactor and 7 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-08-26 10:00:09 -0400 (Wed, 26 Aug 2009)
New Revision: 92830
Removed:
projects/jboss-osgi/trunk/reactor/bundles/
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-framework.xml
Modified:
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/reactor/blueprint/pom.xml
projects/jboss-osgi/trunk/reactor/blueprint/testsuite/pom.xml
projects/jboss-osgi/trunk/testsuite/example/pom.xml
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/services/org.jboss.osgi.spi.framework.OSGiBootstrapProvider
projects/jboss-osgi/trunk/testsuite/functional/pom.xml
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
Allign dependencies with MC Framework.
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-08-26 11:18:35 UTC (rev 92829)
+++ projects/jboss-osgi/trunk/pom.xml 2009-08-26 14:00:09 UTC (rev 92830)
@@ -45,14 +45,14 @@
<version.jboss.osgi.apache.xerces>2.9.1.SP1</version.jboss.osgi.apache.xerces>
<version.jboss.osgi.blueprint>1.0.0.Beta1</version.jboss.osgi.blueprint>
<version.jboss.osgi.common>1.0.1-SNAPSHOT</version.jboss.osgi.common>
- <version.jboss.osgi.common.core>2.2.11.SP1</version.jboss.osgi.common.core>
+ <version.jboss.osgi.common.core>2.2.13-SNAPSHOT</version.jboss.osgi.common.core>
<version.jboss.osgi.hotdeploy>1.0.0</version.jboss.osgi.hotdeploy>
<version.jboss.osgi.husky>1.0.0</version.jboss.osgi.husky>
<version.jboss.osgi.jaxb>2.1.10.SP1</version.jboss.osgi.jaxb>
<version.jboss.osgi.jmx>1.0.0</version.jboss.osgi.jmx>
<version.jboss.osgi.jndi>1.0.0</version.jboss.osgi.jndi>
- <version.jboss.osgi.microcontainer>1.0.0</version.jboss.osgi.microcontainer>
- <version.jboss.osgi.runtime.deployers>1.0.0</version.jboss.osgi.runtime.deployers>
+ <version.jboss.osgi.microcontainer>1.0.1-SNAPSHOT</version.jboss.osgi.microcontainer>
+ <version.jboss.osgi.runtime.deployers>1.0.1-SNAPSHOT</version.jboss.osgi.runtime.deployers>
<version.jboss.osgi.runtime.equinox>3.5-SNAPSHOT</version.jboss.osgi.runtime.equinox>
<version.jboss.osgi.runtime.felix>1.9.0-SNAPSHOT</version.jboss.osgi.runtime.felix>
<version.jboss.osgi.runtime.jbossas>1.0.1-SNAPSHOT</version.jboss.osgi.runtime.jbossas>
Modified: projects/jboss-osgi/trunk/reactor/blueprint/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/pom.xml 2009-08-26 11:18:35 UTC (rev 92829)
+++ projects/jboss-osgi/trunk/reactor/blueprint/pom.xml 2009-08-26 14:00:09 UTC (rev 92830)
@@ -32,10 +32,11 @@
<!-- Properties -->
<properties>
<version.apache.felix.log>1.0.0</version.apache.felix.log>
- <version.jboss.osgi.common.core>2.2.11.SP1</version.jboss.osgi.common.core>
+ <version.jboss.osgi.common.core>2.2.13-SNAPSHOT</version.jboss.osgi.common.core>
<version.jboss.osgi.husky>1.0.0</version.jboss.osgi.husky>
- <version.jboss.osgi.microcontainer>1.0.0</version.jboss.osgi.microcontainer>
+ <version.jboss.osgi.microcontainer>1.0.1-SNAPSHOT</version.jboss.osgi.microcontainer>
<version.jboss.osgi.runtime.felix>1.9.0-SNAPSHOT</version.jboss.osgi.runtime.felix>
+ <version.jboss.osgi.spi>1.0.1-SNAPSHOT</version.jboss.osgi.spi>
<version.osgi>r4v42-20090728</version.osgi>
</properties>
@@ -54,6 +55,11 @@
<version>${version.apache.felix.log}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-spi</artifactId>
+ <version>${version.jboss.osgi.spi}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-common-core</artifactId>
<version>${version.jboss.osgi.common.core}</version>
Modified: projects/jboss-osgi/trunk/reactor/blueprint/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/pom.xml 2009-08-26 11:18:35 UTC (rev 92829)
+++ projects/jboss-osgi/trunk/reactor/blueprint/testsuite/pom.xml 2009-08-26 14:00:09 UTC (rev 92830)
@@ -38,26 +38,38 @@
<!-- Dependencies -->
<dependencies>
<dependency>
+ <groupId>biz.aQute</groupId>
+ <artifactId>bnd</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-blueprint</artifactId>
<version>${version}</version>
<scope>provided</scope>
</dependency>
+ <!-- OSGi Framework -->
<dependency>
- <groupId>biz.aQute</groupId>
- <artifactId>bnd</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss.osgi.runtime</groupId>
<artifactId>jboss-osgi-runtime-felix</artifactId>
+ <scope>provided</scope>
</dependency>
-
+
<!-- Bundle 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>
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
@@ -70,18 +82,6 @@
<scope>provided</scope>
</dependency>
- <!-- OSGi Dependencies -->
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
-
<!-- Test Dependencies -->
<dependency>
<groupId>org.jboss.logging</groupId>
Modified: projects/jboss-osgi/trunk/testsuite/example/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-08-26 11:18:35 UTC (rev 92829)
+++ projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-08-26 14:00:09 UTC (rev 92830)
@@ -37,8 +37,18 @@
<!-- Properties -->
<properties>
+ <version.javax.servlet>2.4</version.javax.servlet>
</properties>
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>${version.javax.servlet}</version>
+ </dependency>
+ </dependencies>
+
<!-- Build -->
<build>
<plugins>
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2009-08-26 11:18:35 UTC (rev 92829)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2009-08-26 14:00:09 UTC (rev 92830)
@@ -1,6 +1,144 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bootstrap xmlns="urn:jboss:bootstrap:1.0">
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <url>jboss-osgi-framework.xml</url>
+ <!--
+ ********************************
+ * *
+ * OSGi Framework *
+ * *
+ ********************************
+ -->
+
+ <bean name="OSGiBundleManager" class="org.jboss.osgi.plugins.facade.bundle.OSGiBundleManager">
+ <constructor><parameter><inject bean="MainDeployer" /></parameter></constructor>
+ <property name="properties">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry><key>org.osgi.framework.storage</key><value>${log4j.output.dir}/osgi-store</value></entry>
+ <entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
+ </map>
+ </property>
+ <incallback method="addPlugin" />
+ <uncallback method="removePlugin" />
+ </bean>
+
+ <bean name="OSGiSystemPackages" class="org.jboss.osgi.plugins.facade.plugins.SystemPackagesPluginImpl">
+ <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ <property name="extraPackages">
+ <list elementClass="java.lang.String">
+ <value>org.jboss.logging;version=2.0</value>
+ <value>org.jboss.osgi.spi.logging;version=1.0</value>
+ <value>org.jboss.osgi.spi.management;version=1.0</value>
+ <value>org.jboss.osgi.spi.service;version=1.0</value>
+ <value>org.jboss.osgi.spi.util;version=1.0</value>
+ </list>
+ </property>
+ </bean>
+
+ <bean name="jboss.osgi:plugin=AutoInstall" class="org.jboss.osgi.plugins.facade.plugins.AutoInstallPluginImpl">
+ <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ <property name="autoInstall">
+ <list elementClass="java.net.URL">
+ <!-- [JBOSGI-136] Cannot resolve dependency against unstarted bundle
+ <value>${test.archive.directory}/bundles/org.osgi.compendium.jar</value -->
+ </list>
+ </property>
+ <property name="autoStart">
+ <list elementClass="java.net.URL">
+ <value>${test.archive.directory}/bundles/org.osgi.compendium.jar</value>
+ <value>${test.archive.directory}/bundles/org.apache.felix.log.jar</value>
+ <value>${test.archive.directory}/bundles/jboss-osgi-common.jar</value>
+ </list>
+ </property>
+ </bean>
+
+ <bean name="OSGiStoragePlugin" class="org.jboss.osgi.plugins.facade.plugins.BundleStoragePluginImpl">
+ <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ </bean>
+
+ <!--
+ ********************************
+ * *
+ * OSGi Deployment *
+ * *
+ ********************************
+ -->
+
+ <!-- The MainDeployer -->
+ <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
+ <property name="structuralDeployers"><inject bean="StructuralDeployers" /></property>
+ <property name="deployers"><inject bean="Deployers" /></property>
+ </bean>
-</bootstrap>
+ <!-- The holder for deployers that determine structure -->
+ <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
+ <property name="structureBuilder">
+ <!-- The consolidator of the structure information -->
+ <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder" />
+ </property>
+ <!-- Accept any implementor of structure deployer -->
+ <incallback method="addDeployer" />
+ <uncallback method="removeDeployer" />
+ </bean>
+
+ <!-- The holder for deployers that do real deployment -->
+ <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
+ <constructor><parameter><inject bean="jboss.kernel:service=KernelController" /></parameter></constructor>
+ <!-- Accept any implementor of deployer -->
+ <incallback method="addDeployer" />
+ <uncallback method="removeDeployer" />
+ </bean>
+
+ <!-- Bundle Structure -->
+ <bean name="BundleStructure" class="org.jboss.osgi.deployer.BundleStructureDeployer" />
+
+ <!-- JAR & File Structure (needed for negative testing) -->
+ <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure" />
+ <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure" />
+
+ <!-- POJO Deployment -->
+ <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer" />
+ <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer" />
+ <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
+ <constructor>
+ <parameter class="org.jboss.dependency.spi.Controller"><inject bean="jboss.kernel:service=KernelController" /></parameter>
+ </constructor>
+ </bean>
+
+ <!-- OSGI Deployment -->
+ <bean name="OSGiManifestParsingDeployer" class="org.jboss.osgi.plugins.deployers.bundle.OSGiManifestParsingDeployer" />
+ <bean name="OSGiBundleStateDeployer" class="org.jboss.osgi.plugins.deployers.bundle.OSGiBundleStateDeployer">
+ <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ </bean>
+ <bean name="OSGiBundleClassLoadingDeployer" class="org.jboss.osgi.plugins.facade.classloading.OSGiBundleClassLoadingDeployer"/>
+ <bean name="OSGiBundleActivatorDeployer" class="org.jboss.osgi.plugins.deployers.bundle.OSGiBundleActivatorDeployer" />
+
+ <!--
+ ********************************
+ * *
+ * OSGi Classloading *
+ * *
+ ********************************
+ -->
+
+ <!-- ClassLoading -->
+ <bean name="ClassLoaderSystem" class="org.jboss.osgi.plugins.facade.classloading.OSGiClassLoaderSystem" >
+ <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ </bean>
+ <bean name="ClassLoading" class="org.jboss.classloading.spi.dependency.ClassLoading">
+ <incallback method="addModule" state="Configured" />
+ <uncallback method="removeModule" state="Configured" />
+ </bean>
+ <bean name="ClassLoadingDefaultDeployer" class="org.jboss.deployers.plugins.classloading.ClassLoadingDefaultDeployer">
+ <property name="defaultMetaData">
+ <classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY" import-all="true" />
+ </property>
+ </bean>
+ <bean name="ClassLoaderClassPathDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderClassPathDeployer" />
+ <bean name="ClassLoaderDescribeDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderDescribeDeployer">
+ <property name="classLoading"><inject bean="ClassLoading" /></property>
+ </bean>
+ <bean name="ClassLoaderDeployer" class="org.jboss.deployers.plugins.classloading.AbstractLevelClassLoaderSystemDeployer">
+ <property name="classLoading"><inject bean="ClassLoading" /></property>
+ <property name="system"><inject bean="ClassLoaderSystem" /></property>
+ </bean>
+
+</deployment>
Deleted: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-framework.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-framework.xml 2009-08-26 11:18:35 UTC (rev 92829)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-framework.xml 2009-08-26 14:00:09 UTC (rev 92830)
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- $Id: jboss-osgi-framework.xml 92605 2009-08-20 10:29:21Z thomas.diesler(a)jboss.com $
--->
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <!--
- ********************************
- * *
- * Framework *
- * *
- ********************************
- -->
-
- <!-- The OSGi Framework Factory -->
- <bean name="jboss.osgi:service=FrameworkFactory" class="org.jboss.osgi.jbossmc.framework.launch.FrameworkFactoryBean">
- <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
- <property name="properties">
- <map keyClass="java.lang.String" valueClass="java.lang.String">
- <entry><key>org.osgi.framework.storage</key><value>${log4j.output.dir}/osgi-store</value></entry>
- <entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
- <entry>
- <key>org.osgi.framework.system.packages.extra</key>
- <value>
- <!-- system -->
- javax.xml.bind.annotation;version=2.1,
- org.apache.xerces.dom;version=2.9,
-
- <!-- jboss-osgi -->
- org.jboss.osgi.jmx;version=1.0,
- org.jboss.osgi.jndi;version=1.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.logging;version=1.0,
- org.jboss.osgi.spi.management;version=1.0,
- org.jboss.osgi.spi.service;version=1.0,
- org.jboss.osgi.spi.testing;version=1.0,
- org.jboss.osgi.spi.util;version=1.0,
- org.jboss.osgi.xml;version=1.0,
-
- <!-- jboss -->
- org.jboss.beans.metadata.plugins;version=2.0,
- org.jboss.beans.metadata.plugins.builder;version=2.0,
- org.jboss.beans.metadata.spi.builder;version=2.0,
- org.jboss.beans.metadata.spi;version=2.0,
- org.jboss.dependency.spi;version=2.0,
- org.jboss.kernel.spi.dependency;version=2.0,
- org.jboss.logging,
- org.jboss.reflect.spi;version=2.0,
- org.jboss.util.xml;version=2.2,
- org.jboss.virtual,
- org.jboss.virtual.plugins.registry,
- org.jboss.virtual.plugins.context.jar,
- org.jboss.virtual.plugins.vfs.helpers,
- org.jboss.virtual.protocol,
- org.jboss.xb.annotations;version=2.0,
- org.jboss.xb.binding;version=2.0,
- org.jboss.xb.binding.sunday.unmarshalling;version=2.0,
- </value>
- </entry>
- </map>
- </property>
- <property name="plugins">
- <list elementClass="org.jboss.osgi.jbossmc.api.AbstractPlugin">
- <inject bean="jboss.osgi:plugin=AutoInstall"/>
- </list>
- </property>
- </bean>
-
- <!--
- ********************************
- * *
- * Framework Plugins *
- * *
- ********************************
- -->
-
- <bean name="jboss.osgi:plugin=AutoInstall" class="org.jboss.osgi.jbossmc.framework.plugins.AutoInstallPluginImpl">
- <property name="autoInstall">
- <list elementClass="java.net.URL">
- <value>${test.archive.directory}/bundles/org.osgi.compendium.jar</value>
- </list>
- </property>
- <property name="autoStart">
- <list elementClass="java.net.URL">
- <value>${test.archive.directory}/bundles/org.apache.felix.log.jar</value>
- <value>${test.archive.directory}/bundles/jboss-osgi-common.jar</value>
- </list>
- </property>
- </bean>
-
-</deployment>
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/services/org.jboss.osgi.spi.framework.OSGiBootstrapProvider
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/services/org.jboss.osgi.spi.framework.OSGiBootstrapProvider 2009-08-26 11:18:35 UTC (rev 92829)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/services/org.jboss.osgi.spi.framework.OSGiBootstrapProvider 2009-08-26 14:00:09 UTC (rev 92830)
@@ -1,4 +1,3 @@
org.jboss.osgi.plugins.facade.launch.OSGiFrameworkBootstrapProvider # The MC Facade bootstrap provider
-org.jboss.osgi.jbossmc.framework.launch.FrameworkBootstrapProvider # The legacy MC based framework bootstrap provider
org.jboss.osgi.equinox.EquinoxBootstrapProvider # The Equinox bootstrap provider
org.jboss.osgi.felix.FelixBootstrapProvider # The Felix bootstrap provider
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/functional/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-08-26 11:18:35 UTC (rev 92829)
+++ projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-08-26 14:00:09 UTC (rev 92830)
@@ -37,6 +37,7 @@
<!-- Properties -->
<properties>
+ <version.jboss.microcontainer>2.0.9-SNAPSHOT</version.jboss.microcontainer>
</properties>
<!-- Dependencies -->
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-08-26 11:18:35 UTC (rev 92829)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-08-26 14:00:09 UTC (rev 92830)
@@ -34,10 +34,7 @@
<!-- Properties -->
<properties>
- <version.javax.servlet>2.4</version.javax.servlet>
- <version.jbossas.client>5.0.1.GA</version.jbossas.client>
<version.jboss.naming>5.0.1.GA</version.jboss.naming>
- <version.jboss.microcontainer>2.0.5.GA</version.jboss.microcontainer>
</properties>
<!-- Dependencies -->
@@ -47,21 +44,11 @@
<artifactId>bnd</artifactId>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>${version.javax.servlet}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>${version.jboss.naming}</version>
- </dependency>
- <dependency>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-spi</artifactId>
<version>${version.jboss.osgi.spi}</version>
</dependency>
-
+
<!-- Bundle Dependencies -->
<dependency>
<groupId>org.apache.felix</groupId>
@@ -145,12 +132,19 @@
<version>${version.jboss.osgi.common}</version>
<scope>provided</scope>
</dependency>
-
+
<!-- Test Dependencies -->
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.jboss.naming</groupId>
+ <artifactId>jnpserver</artifactId>
+ <version>${version.jboss.naming}</version>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
@@ -158,7 +152,7 @@
<scope>test</scope>
</dependency>
</dependencies>
-
+
<!-- Build -->
<build>
<testResources>
@@ -195,21 +189,10 @@
</dependencies>
-->
- <!-- default to jbossmc (legacy)
+ <!-- default to felix -->
<dependencies>
<dependency>
<groupId>org.jboss.osgi.runtime</groupId>
- <artifactId>jboss-osgi-runtime-jbossmc</artifactId>
- <version>${version.jboss.osgi.runtime.jbossmc}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
- -->
-
- <!-- default to felix -->
- <dependencies>
- <dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
<artifactId>jboss-osgi-runtime-felix</artifactId>
<version>${version.jboss.osgi.runtime.felix}</version>
<scope>provided</scope>
@@ -297,7 +280,7 @@
<dependencies>
<dependency>
<groupId>org.jboss.osgi.runtime</groupId>
- <artifactId>jboss-osgi-runtime-jbossmc</artifactId>
+ <artifactId>jboss-osgi-runtime-microcontainer</artifactId>
<version>${version.jboss.osgi.runtime.jbossmc}</version>
<scope>provided</scope>
</dependency>
16 years, 4 months
JBoss-OSGI SVN: r92823 - projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/launch.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-08-26 06:06:17 -0400 (Wed, 26 Aug 2009)
New Revision: 92823
Modified:
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/launch/OSGiFrameworkFactory.java
Log:
Improve error message on missing botstrap configs
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/launch/OSGiFrameworkFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/launch/OSGiFrameworkFactory.java 2009-08-26 10:02:04 UTC (rev 92822)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/launch/OSGiFrameworkFactory.java 2009-08-26 10:06:17 UTC (rev 92823)
@@ -24,6 +24,7 @@
// $Id$
import java.net.URL;
+import java.util.Arrays;
import java.util.Map;
import org.jboss.dependency.spi.ControllerContext;
@@ -61,7 +62,7 @@
BasicXMLDeployer deployer = new BasicXMLDeployer(kernel, ControllerMode.AUTOMATIC);
URL url = null;
- String[] bootstraps = new String[] { "/bootstrap/bootstrap.xml", "/META-INF/bootstrap.xml" };
+ String[] bootstraps = new String[] { "/bootstrap/bootstrap.xml", "/META-INF/jboss-osgi-bootstrap.xml" };
for (String xml : bootstraps)
{
url = getClass().getResource(xml);
@@ -69,7 +70,7 @@
break;
}
if (url == null)
- throw new IllegalStateException("Cannot find any bootstrap: " + bootstraps);
+ throw new IllegalStateException("Cannot find any bootstrap: " + Arrays.asList(bootstraps));
try
{
16 years, 4 months
JBoss-OSGI SVN: r92822 - in projects/jboss-osgi/projects/runtime/microcontainer/trunk/src: test/java/org/jboss/test/osgi/integration/simple and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-08-26 06:02:04 -0400 (Wed, 26 Aug 2009)
New Revision: 92822
Modified:
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleManager.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleBundleTestCase.java
Log:
[JBOSGI-139] Implement system BundleContext.loadClass()
getServiceReference on the system context ignores isAssignable
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleManager.java 2009-08-26 09:48:25 UTC (rev 92821)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleManager.java 2009-08-26 10:02:04 UTC (rev 92822)
@@ -673,9 +673,13 @@
*/
ServiceReference getServiceReference(OSGiBundleState bundleState, String clazz)
{
- Collection<OSGiServiceState> services = getServices(bundleState, clazz, null, true);
+ // Ignore isAssignable for the system context
+ boolean checkAssignable = (bundleState.getBundleId() != 0);
+
+ Collection<OSGiServiceState> services = getServices(bundleState, clazz, null, checkAssignable);
if (services == null || services.isEmpty())
return null;
+
OSGiServiceState service = services.iterator().next();
return service.getReferenceInternal();
}
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleBundleTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleBundleTestCase.java 2009-08-26 09:48:25 UTC (rev 92821)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleBundleTestCase.java 2009-08-26 10:02:04 UTC (rev 92822)
@@ -67,12 +67,13 @@
BundleContext bndContext = bundle.getBundleContext();
assertNotNull("BundleContext not null", bndContext);
+ // getServiceReference from bundle context
ServiceReference sref = bndContext.getServiceReference(SimpleService.class.getName());
assertNotNull("ServiceReference not null", sref);
- // [TODO] getServiceReference from system context
- //sref = sysContext.getServiceReference(SimpleService.class.getName());
- //assertNotNull("ServiceReference not null", sref);
+ // getServiceReference from system context
+ sref = sysContext.getServiceReference(SimpleService.class.getName());
+ assertNotNull("ServiceReference not null", sref);
bundle.uninstall();
assertEquals("Bundle state", Bundle.UNINSTALLED, bundle.getState());
16 years, 4 months
JBoss-OSGI SVN: r92821 - in projects/jboss-osgi/projects/runtime/microcontainer/trunk/src: test/java/org/jboss/test/osgi/bundle/test and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-08-26 05:48:25 -0400 (Wed, 26 Aug 2009)
New Revision: 92821
Modified:
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleState.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiSystemBundle.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/bundle/test/SystemBundleUnitTestCase.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleBundleTestCase.java
Log:
[JBOSGI-138] Proper system BundleContext implementation
Throw NIE and add test stubs
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleState.java 2009-08-26 07:12:08 UTC (rev 92820)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleState.java 2009-08-26 09:48:25 UTC (rev 92821)
@@ -63,7 +63,6 @@
import org.osgi.framework.BundleEvent;
import org.osgi.framework.BundleException;
import org.osgi.framework.BundleListener;
-import org.osgi.framework.Constants;
import org.osgi.framework.Filter;
import org.osgi.framework.FrameworkEvent;
import org.osgi.framework.FrameworkListener;
@@ -405,8 +404,7 @@
return null;
}
- @SuppressWarnings("unchecked")
- public Class loadClass(String name) throws ClassNotFoundException
+ public Class<?> loadClass(String name) throws ClassNotFoundException
{
checkInstalled();
checkAdminPermission(AdminPermission.CLASS);
@@ -758,7 +756,7 @@
String bundleActivatorClassName = metaData.getBundleActivator();
if (bundleActivatorClassName != null)
{
- ClassLoader classLoader = unit.getClassLoader();
+ ClassLoader classLoader = getDeploymentUnit().getClassLoader();
DeploymentControllerContext deploymentControllerContext = getDeploymentUnit().getAttachment(ControllerContext.class.getName(),
DeploymentControllerContext.class);
@@ -771,7 +769,7 @@
if (result instanceof BundleActivator == false)
throw new BundleException(bundleActivatorClassName + " is not an implementation of " + BundleActivator.class.getName());
BundleActivator bundleActivator = (BundleActivator)result;
- unit.addAttachment(BundleActivator.class, bundleActivator);
+ getDeploymentUnit().addAttachment(BundleActivator.class, bundleActivator);
bundleActivator.start(bundleContext);
}
@@ -823,7 +821,7 @@
Throwable rethrow = null;
try
{
- BundleActivator bundleActivator = unit.getAttachment(BundleActivator.class);
+ BundleActivator bundleActivator = getDeploymentUnit().getAttachment(BundleActivator.class);
BundleContext bundleContext = this.bundleContext;
if (bundleActivator != null && bundleContext != null)
{
@@ -874,7 +872,7 @@
if (getState() == STOPPING)
changeState(RESOLVED);
bundleContext = null;
- unit.removeAttachment(BundleActivator.class);
+ getDeploymentUnit().removeAttachment(BundleActivator.class);
}
if (rethrow != null)
@@ -1226,7 +1224,7 @@
*
* @throws IllegalStateException when the bundle is not installed
*/
- private void checkInstalled()
+ protected void checkInstalled()
{
if ((getState() & Bundle.UNINSTALLED) != 0)
throw new IllegalStateException("Bundle " + getCanonicalName() + " is not installed");
@@ -1238,7 +1236,7 @@
* @return the bundle context
* @throws IllegalArgumentException when the context is no longer valid
*/
- private synchronized BundleContext checkValidBundleContext()
+ protected synchronized BundleContext checkValidBundleContext()
{
BundleContext result = this.bundleContext;
if (result == null)
@@ -1252,7 +1250,7 @@
* @param what what permission to check
* @throws SecurityException when the caller does not have the AdminPermission and a security manager is installed
*/
- private void checkAdminPermission(String what)
+ protected void checkAdminPermission(String what)
{
SecurityManager sm = System.getSecurityManager();
if (sm != null)
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiSystemBundle.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiSystemBundle.java 2009-08-26 07:12:08 UTC (rev 92820)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiSystemBundle.java 2009-08-26 09:48:25 UTC (rev 92821)
@@ -23,7 +23,9 @@
import java.io.InputStream;
+import org.jboss.osgi.spi.NotImplementedException;
import org.jboss.osgi.spi.metadata.OSGiMetaData;
+import org.osgi.framework.AdminPermission;
import org.osgi.framework.BundleException;
import org.osgi.framework.Constants;
@@ -51,6 +53,12 @@
return Constants.SYSTEM_BUNDLE_LOCATION;
}
+ public Class<?> loadClass(String name) throws ClassNotFoundException
+ {
+ // [JBOSGI-138] Proper system BundleContext implementation
+ throw new NotImplementedException();
+ }
+
@Override
public void stop(int options) throws BundleException
{
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/bundle/test/SystemBundleUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/bundle/test/SystemBundleUnitTestCase.java 2009-08-26 07:12:08 UTC (rev 92820)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/bundle/test/SystemBundleUnitTestCase.java 2009-08-26 09:48:25 UTC (rev 92821)
@@ -121,4 +121,34 @@
{
assertEquals(Constants.SYSTEM_BUNDLE_LOCATION, systemBundle.getLocation());
}
+
+ public void testGetEntry()
+ {
+ // TODO [JBOSGI-138] Proper system BundleContext implementation
+ }
+
+ public void testGetEntryPath()
+ {
+ // TODO [JBOSGI-138] Proper system BundleContext implementation
+ }
+
+ public void testFindEntries()
+ {
+ // TODO [JBOSGI-138] Proper system BundleContext implementation
+ }
+
+ public void testLoadClass()
+ {
+ // TODO [JBOSGI-138] Proper system BundleContext implementation
+ }
+
+ public void testGetResource()
+ {
+ // TODO [JBOSGI-138] Proper system BundleContext implementation
+ }
+
+ public void testGetResources()
+ {
+ // TODO [JBOSGI-138] Proper system BundleContext implementation
+ }
}
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleBundleTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleBundleTestCase.java 2009-08-26 07:12:08 UTC (rev 92820)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleBundleTestCase.java 2009-08-26 09:48:25 UTC (rev 92821)
@@ -24,14 +24,17 @@
//$Id$
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
import org.jboss.osgi.spi.testing.OSGiBundle;
import org.jboss.osgi.spi.testing.OSGiRuntime;
import org.jboss.osgi.spi.testing.OSGiTestHelper;
import org.jboss.osgi.spi.util.ServiceLoader;
+import org.jboss.test.osgi.integration.simple.bundleA.SimpleService;
import org.junit.Test;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
import org.osgi.framework.launch.Framework;
import org.osgi.framework.launch.FrameworkFactory;
@@ -55,12 +58,22 @@
BundleContext sysContext = framework.getBundleContext();
Bundle bundle = sysContext.installBundle(helper.getTestArchivePath("simple-bundle.jar"));
-
+
assertEquals("simple-bundle", bundle.getSymbolicName());
bundle.start();
assertEquals("Bundle state", Bundle.ACTIVE, bundle.getState());
+ BundleContext bndContext = bundle.getBundleContext();
+ assertNotNull("BundleContext not null", bndContext);
+
+ ServiceReference sref = bndContext.getServiceReference(SimpleService.class.getName());
+ assertNotNull("ServiceReference not null", sref);
+
+ // [TODO] getServiceReference from system context
+ //sref = sysContext.getServiceReference(SimpleService.class.getName());
+ //assertNotNull("ServiceReference not null", sref);
+
bundle.uninstall();
assertEquals("Bundle state", Bundle.UNINSTALLED, bundle.getState());
16 years, 4 months
JBoss-OSGI SVN: r92820 - projects/jboss-osgi/trunk/reactor/blueprint.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-08-26 03:12:08 -0400 (Wed, 26 Aug 2009)
New Revision: 92820
Modified:
projects/jboss-osgi/trunk/reactor/blueprint/pom.xml
Log:
Fix blueprint parent
Modified: projects/jboss-osgi/trunk/reactor/blueprint/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/pom.xml 2009-08-26 03:04:05 UTC (rev 92819)
+++ projects/jboss-osgi/trunk/reactor/blueprint/pom.xml 2009-08-26 07:12:08 UTC (rev 92820)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-parent</artifactId>
- <version>1.0.1</version>
+ <version>1.0.2-SNAPSHOT</version>
</parent>
<!-- Properties -->
16 years, 4 months
JBoss-OSGI SVN: r92811 - projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/metadata.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-08-25 16:19:18 -0400 (Tue, 25 Aug 2009)
New Revision: 92811
Modified:
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/metadata/AbstractOSGiMetaData.java
Log:
[JBOSGI-137] Cannot parse Bundle-SymbolicName
Document the fallback hack
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/metadata/AbstractOSGiMetaData.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/metadata/AbstractOSGiMetaData.java 2009-08-25 20:06:33 UTC (rev 92810)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/metadata/AbstractOSGiMetaData.java 2009-08-25 20:19:18 UTC (rev 92811)
@@ -177,7 +177,7 @@
if (parameters != null)
symbolicName = parameters.getAttribute();
- // [TODO] Remove this fall back
+ // [TODO] [JBOSGI-137] Cannot parse Bundle-SymbolicName
if (symbolicName == null)
symbolicName = getMainAttribute(Constants.BUNDLE_SYMBOLICNAME);
16 years, 4 months
JBoss-OSGI SVN: r92810 - in projects/jboss-osgi/projects/runtime/microcontainer/trunk/src: test/java/org/jboss/test/osgi/integration/simple and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-08-25 16:06:33 -0400 (Tue, 25 Aug 2009)
New Revision: 92810
Modified:
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageCapability.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTestCase.java
Log:
[JBOSGI-135] Cannot handle package being imported and exported by the same bundle
Fixed typo in OSGiPackageCapability
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageCapability.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageCapability.java 2009-08-25 19:49:33 UTC (rev 92809)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageCapability.java 2009-08-25 20:06:33 UTC (rev 92810)
@@ -92,7 +92,7 @@
if (versionString.startsWith("\"") && versionString.endsWith("\""))
versionString = versionString.substring(1, versionString.length() - 1);
- Version.parseVersion(versionString);
+ version = Version.parseVersion(versionString);
}
OSGiPackageCapability capability = new OSGiPackageCapability(name, version, metadata, exportPackage);
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTestCase.java 2009-08-25 19:49:33 UTC (rev 92809)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTestCase.java 2009-08-25 20:06:33 UTC (rev 92810)
@@ -31,7 +31,6 @@
import org.jboss.osgi.spi.testing.OSGiTest;
import org.jboss.osgi.spi.util.ServiceLoader;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -77,7 +76,6 @@
}
@Test
- @Ignore
public void testLogServiceFromThirdParty() throws Exception
{
FrameworkFactory factory = ServiceLoader.loadService(FrameworkFactory.class);
@@ -129,7 +127,6 @@
}
@Test
- @Ignore
public void testLogServiceFromTwoExporters() throws Exception
{
FrameworkFactory factory = ServiceLoader.loadService(FrameworkFactory.class);
16 years, 4 months
JBoss-OSGI SVN: r92809 - in projects/jboss-osgi/projects/runtime/microcontainer/trunk: src/main/java/org/jboss/osgi/plugins/facade/classloading and 2 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-08-25 15:49:33 -0400 (Tue, 25 Aug 2009)
New Revision: 92809
Modified:
projects/jboss-osgi/projects/runtime/microcontainer/trunk/pom.xml
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageRequirement.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/metadata/AbstractVersionRange.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTestCase.java
Log:
Fix import package version range parsing
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/pom.xml 2009-08-25 19:27:32 UTC (rev 92808)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/pom.xml 2009-08-25 19:49:33 UTC (rev 92809)
@@ -33,7 +33,7 @@
<!-- Properties -->
<properties>
- <version.apache.felix.log>1.1.0-SNAPSHOT</version.apache.felix.log>
+ <version.apache.felix.log>1.0.0</version.apache.felix.log>
<version.jboss.aop>2.1.0.CR3</version.jboss.aop>
<version.jboss.classloading>2.0.7-SNAPSHOT</version.jboss.classloading>
<version.jboss.deployers>2.0.8.GA</version.jboss.deployers>
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageRequirement.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageRequirement.java 2009-08-25 19:27:32 UTC (rev 92808)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageRequirement.java 2009-08-25 19:49:33 UTC (rev 92809)
@@ -61,19 +61,19 @@
String name = requirePackage.getAttribute();
AbstractVersionRange range = null;
- String version = requirePackage.getParameterValue(Constants.VERSION_ATTRIBUTE, String.class);
- if (version != null)
+ String versionString = requirePackage.getParameterValue(Constants.VERSION_ATTRIBUTE, String.class);
+ if (versionString != null)
{
- range = (AbstractVersionRange) AbstractVersionRange.valueOf(version);
- String old = requirePackage.getParameterValue(Constants.PACKAGE_SPECIFICATION_VERSION, String.class);
- if (old != null && old.equals(version) == false)
- throw new IllegalStateException(Constants.VERSION_ATTRIBUTE + " of " + version + " does not match " + Constants.PACKAGE_SPECIFICATION_VERSION + " of " + old);
+ range = (AbstractVersionRange) AbstractVersionRange.valueOf(versionString);
+ String oldVersionString = requirePackage.getParameterValue(Constants.PACKAGE_SPECIFICATION_VERSION, String.class);
+ if (oldVersionString != null && oldVersionString.equals(versionString) == false)
+ throw new IllegalStateException(Constants.VERSION_ATTRIBUTE + " of " + versionString + " does not match " + Constants.PACKAGE_SPECIFICATION_VERSION + " of " + oldVersionString);
}
else
{
- version = requirePackage.getParameterValue(Constants.PACKAGE_SPECIFICATION_VERSION, String.class);
- if (version != null)
- range = (AbstractVersionRange) AbstractVersionRange.valueOf(version);
+ versionString = requirePackage.getParameterValue(Constants.PACKAGE_SPECIFICATION_VERSION, String.class);
+ if (versionString != null)
+ range = (AbstractVersionRange) AbstractVersionRange.valueOf(versionString);
}
return new OSGiPackageRequirement(name, range, requirePackage);
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/metadata/AbstractVersionRange.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/metadata/AbstractVersionRange.java 2009-08-25 19:27:32 UTC (rev 92808)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/metadata/AbstractVersionRange.java 2009-08-25 19:49:33 UTC (rev 92809)
@@ -68,6 +68,10 @@
if (rangeSpec == null)
throw new IllegalArgumentException("Null rangeSpec");
+ // Handle version strings with quotes
+ if (rangeSpec.startsWith("\"") && rangeSpec.endsWith("\""))
+ rangeSpec = rangeSpec.substring(1, rangeSpec.length() - 1);
+
Version floor = null;
Version ceiling = null;
StringTokenizer st = new StringTokenizer(rangeSpec, ",[]()", true);
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTestCase.java 2009-08-25 19:27:32 UTC (rev 92808)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTestCase.java 2009-08-25 19:49:33 UTC (rev 92809)
@@ -148,10 +148,8 @@
assertNotNull("Result property not null", result);
assertTrue("BundleActivator start", result.indexOf("startBundleActivator") > 0);
-
- System.out.println("FIXME [JBOSGI-135] Cannot handle package beeing imported and exported by the same bundle");
- //assertTrue("getService", result.indexOf("getService") > 0);
- //assertTrue("addingService", result.indexOf("addingService") > 0);
+ assertTrue("getService", result.indexOf("getService") > 0);
+ assertTrue("addingService", result.indexOf("addingService") > 0);
framework.stop();
}
16 years, 4 months
JBoss-OSGI SVN: r92808 - in projects/jboss-osgi/projects/runtime/microcontainer/trunk/src: test/java/org/jboss/test/osgi/integration/simple and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-08-25 15:27:32 -0400 (Tue, 25 Aug 2009)
New Revision: 92808
Modified:
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiBundleClassLoadingDeployer.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageCapability.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageRequirement.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTestCase.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/resources/bundles/classloader/versionimportpackagefails/META-INF/MANIFEST.MF
Log:
Fix ExportImportPackageUnitTestCase, now using [3.0,4.0)
Add SplitPackagePolicy.First
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiBundleClassLoadingDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiBundleClassLoadingDeployer.java 2009-08-25 19:16:46 UTC (rev 92807)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiBundleClassLoadingDeployer.java 2009-08-25 19:27:32 UTC (rev 92808)
@@ -68,6 +68,7 @@
OSGiBundleState bundleState = unit.getAttachment(OSGiBundleState.class);
if (bundleState == null)
throw new IllegalStateException("No bundle state");
+
OSGiBundleManager bundleManager = bundleState.getBundleManager();
ClassLoadingMetaData classLoadingMetaData = new ClassLoadingMetaData();
@@ -90,8 +91,6 @@
}
}
- ArrayList<String> exportedNames = new ArrayList<String>();
-
List<PackageAttribute> exported = deployment.getExportPackages();
if (exported != null && exported.isEmpty() == false)
{
@@ -99,7 +98,6 @@
{
OSGiPackageCapability packageCapability = OSGiPackageCapability.create(deployment, packageAttribute);
capabilities.addCapability(packageCapability);
- exportedNames.add(packageCapability.getName());
}
}
@@ -111,14 +109,9 @@
{
String packageName = packageAttribute.getAttribute();
- // [TODO] Import package requirements should probably resolve against export capabilities
- boolean isExportPackage = exportedNames.contains(packageName);
-
// [TODO] Should system packages be added as capabilities?
boolean isSystemPackage = syspackPlugin.isSystemPackage(packageName);
-
- // [TODO] add exported package requirements
- if (isSystemPackage == false && isExportPackage == false)
+ if (isSystemPackage == false)
{
OSGiPackageRequirement requirement = OSGiPackageRequirement.create(packageAttribute);
requirements.addRequirement(requirement);
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageCapability.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageCapability.java 2009-08-25 19:16:46 UTC (rev 92807)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageCapability.java 2009-08-25 19:27:32 UTC (rev 92808)
@@ -95,7 +95,10 @@
Version.parseVersion(versionString);
}
- return new OSGiPackageCapability(name, version, metadata, exportPackage);
+ OSGiPackageCapability capability = new OSGiPackageCapability(name, version, metadata, exportPackage);
+ capability.setSplitPackagePolicy(SplitPackagePolicy.First);
+
+ return capability;
}
/**
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageRequirement.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageRequirement.java 2009-08-25 19:16:46 UTC (rev 92807)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/classloading/OSGiPackageRequirement.java 2009-08-25 19:27:32 UTC (rev 92808)
@@ -52,6 +52,7 @@
* @return the requirement
* @throws IllegalArgumentException for a null requirePackage
*/
+ @SuppressWarnings("deprecation")
public static OSGiPackageRequirement create(PackageAttribute requirePackage)
{
if (requirePackage == null)
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTestCase.java 2009-08-25 19:16:46 UTC (rev 92807)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTestCase.java 2009-08-25 19:27:32 UTC (rev 92808)
@@ -31,6 +31,7 @@
import org.jboss.osgi.spi.testing.OSGiTest;
import org.jboss.osgi.spi.util.ServiceLoader;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -76,6 +77,7 @@
}
@Test
+ @Ignore
public void testLogServiceFromThirdParty() throws Exception
{
FrameworkFactory factory = ServiceLoader.loadService(FrameworkFactory.class);
@@ -127,6 +129,7 @@
}
@Test
+ @Ignore
public void testLogServiceFromTwoExporters() throws Exception
{
FrameworkFactory factory = ServiceLoader.loadService(FrameworkFactory.class);
@@ -138,13 +141,6 @@
sysContext.installBundle(getTestArchivePath("bundles/org.apache.felix.log.jar")).start();
Bundle bundle = sysContext.installBundle(getTestArchivePath("simple-logservice-bundle.jar"));
-
- if (true)
- {
- System.out.println("FIXME [JBOSGI-135] Cannot handle package beeing imported and exported by the same bundle");
- return;
- }
-
bundle.start();
// The bundle activator is expected to set this property
@@ -152,8 +148,10 @@
assertNotNull("Result property not null", result);
assertTrue("BundleActivator start", result.indexOf("startBundleActivator") > 0);
- assertTrue("getService", result.indexOf("getService") > 0);
- assertTrue("addingService", result.indexOf("addingService") > 0);
+
+ System.out.println("FIXME [JBOSGI-135] Cannot handle package beeing imported and exported by the same bundle");
+ //assertTrue("getService", result.indexOf("getService") > 0);
+ //assertTrue("addingService", result.indexOf("addingService") > 0);
framework.stop();
}
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/resources/bundles/classloader/versionimportpackagefails/META-INF/MANIFEST.MF
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/resources/bundles/classloader/versionimportpackagefails/META-INF/MANIFEST.MF 2009-08-25 19:16:46 UTC (rev 92807)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/resources/bundles/classloader/versionimportpackagefails/META-INF/MANIFEST.MF 2009-08-25 19:27:32 UTC (rev 92808)
@@ -4,4 +4,4 @@
Implementation-Vendor: jboss.org
Bundle-Name: BundleB
Bundle-SymbolicName: org.jboss.test.osgi.classloader.bundleB
-Import-Package: org.jboss.test.osgi.classloader.support.a;version="[0.0.0,1.0.0)"
+Import-Package: org.jboss.test.osgi.classloader.support.a;version="[3.0,4.0)"
16 years, 4 months