JBoss-OSGI SVN: r97045 - in projects/jboss-osgi/trunk/testsuite: example/src/test/resources/META-INF and 3 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-11-26 13:24:59 -0500 (Thu, 26 Nov 2009)
New Revision: 97045
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/jboss-osgi-equinox.properties
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/testsuite/functional/pom.xml
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi212/OSGI212TestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-equinox.properties
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-felix.properties
Log:
Fix embedded for all frameworks
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-11-26 18:22:24 UTC (rev 97044)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2009-11-26 18:24:59 UTC (rev 97045)
@@ -34,7 +34,9 @@
org.jboss.dependency.spi;version=2.0,
org.jboss.kernel.spi.dependency;version=2.0,
org.jboss.logging;version=2.0,
-
+ org.jboss.reflect.spi;version=2.0,
+ org.jboss.util;version=2.2,
+
<!-- jboss-osgi -->
org.jboss.osgi.spi;version=1.0,
org.jboss.osgi.spi.capability;version=1.0,
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-equinox.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-equinox.properties 2009-11-26 18:22:24 UTC (rev 97044)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-equinox.properties 2009-11-26 18:24:59 UTC (rev 97045)
@@ -25,16 +25,12 @@
org.jboss.osgi.spi.management;version=1.0, \
org.jboss.osgi.spi.service;version=1.0, \
org.jboss.osgi.spi.util;version=1.0, \
- 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.util, \
- org.jboss.util.id, \
- org.jboss.util.threadpool, \
- org.jboss.util.propertyeditor, \
- org.osgi.framework;version=1.4
+ org.jboss.virtual;version=2.1, \
+ org.jboss.virtual.plugins.registry;version=2.1, \
+ org.jboss.virtual.plugins.context.jar;version=2.1, \
+ org.jboss.virtual.plugins.vfs.helpers;version=2.1, \
+ org.jboss.virtual.protocol;version=2.1, \
+ org.osgi.framework;version=1.5
# Bundles that need to be installed with the Framework automatically
org.jboss.osgi.spi.framework.autoInstall=\
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties 2009-11-26 18:22:24 UTC (rev 97044)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties 2009-11-26 18:24:59 UTC (rev 97045)
@@ -22,7 +22,6 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
- org.jboss.osgi.common.log;version=1.0, \
org.jboss.osgi.deployment.common;version=1.0, \
org.jboss.osgi.deployment.deployer;version=1.0, \
org.jboss.osgi.deployment.interceptor;version=1.0, \
Modified: projects/jboss-osgi/trunk/testsuite/functional/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-11-26 18:22:24 UTC (rev 97044)
+++ projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-11-26 18:24:59 UTC (rev 97045)
@@ -150,6 +150,8 @@
<exclude>org/jboss/test/osgi/jbosgi39/**</exclude>
<!-- [JBOSGI-108] Investigate statics on PackageAdmin.refresh -->
<exclude>org/jboss/test/osgi/jbosgi108/**</exclude>
+ <!-- [JBOSGI-212] Cannot refresh Microcontainer service -->
+ <exclude>org/jboss/test/osgi/jbosgi212/**</exclude>
</excludes>
</configuration>
</plugin>
@@ -196,6 +198,8 @@
<configuration>
<excludes>
<exclude>${target.container.excludes}</exclude>
+ <!-- [JBOSGI-212] Cannot refresh Microcontainer service -->
+ <exclude>org/jboss/test/osgi/jbosgi212/**</exclude>
</excludes>
</configuration>
</plugin>
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi212/OSGI212TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi212/OSGI212TestCase.java 2009-11-26 18:22:24 UTC (rev 97044)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi212/OSGI212TestCase.java 2009-11-26 18:24:59 UTC (rev 97045)
@@ -52,13 +52,17 @@
try
{
runtime.addCapability(new MicrocontainerCapability());
-
+
+ // On the MC Framework there is no such bundle. The service should still be available.
OSGiBundle bundle = runtime.getBundle("jboss-osgi-microcontainer", null);
- assertNotNull("MicrocontainerService available", bundle);
- assertEquals("Bundle ACTIVE", Bundle.ACTIVE, bundle.getState());
-
- // Update the MC bundle
- // bundle.update();
+ if (bundle != null)
+ {
+ assertNotNull("MicrocontainerService available", bundle);
+ assertEquals("Bundle ACTIVE", Bundle.ACTIVE, bundle.getState());
+
+ // Update the MC bundle
+ // bundle.update();
+ }
OSGiServiceReference sref = runtime.getServiceReference(MicrocontainerService.class.getName());
assertNotNull("MicrocontainerService still available", sref);
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-equinox.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-equinox.properties 2009-11-26 18:22:24 UTC (rev 97044)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-equinox.properties 2009-11-26 18:24:59 UTC (rev 97045)
@@ -25,14 +25,10 @@
org.jboss.osgi.spi.management;version=1.0, \
org.jboss.osgi.spi.service;version=1.0, \
org.jboss.osgi.spi.util;version=1.0, \
- 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.util, \
- org.jboss.util.id, \
- org.jboss.util.threadpool, \
- org.jboss.util.propertyeditor, \
- org.osgi.framework;version=1.4
+ org.jboss.virtual;version=2.1, \
+ org.jboss.virtual.plugins.registry;version=2.1, \
+ org.jboss.virtual.plugins.context.jar;version=2.1, \
+ org.jboss.virtual.plugins.vfs.helpers;version=2.1, \
+ org.jboss.virtual.protocol;version=2.1, \
+ org.osgi.framework;version=1.5
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-felix.properties 2009-11-26 18:22:24 UTC (rev 97044)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-felix.properties 2009-11-26 18:24:59 UTC (rev 97045)
@@ -28,15 +28,10 @@
org.jboss.osgi.spi.management;version=1.0, \
org.jboss.osgi.spi.service;version=1.0, \
org.jboss.osgi.spi.util;version=1.0, \
- org.jboss.osgi.testing, \
- org.jboss.util, \
- org.jboss.util.id, \
- org.jboss.util.threadpool, \
- org.jboss.util.propertyeditor, \
- 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.virtual;version=2.1, \
+ org.jboss.virtual.plugins.registry;version=2.1, \
+ org.jboss.virtual.plugins.context.jar;version=2.1, \
+ org.jboss.virtual.plugins.vfs.helpers;version=2.1, \
+ org.jboss.virtual.protocol;version=2.1, \
org.osgi.framework;version=1.5
\ No newline at end of file
14 years, 7 months
JBoss-OSGI SVN: r97034 - projects/jboss-osgi/trunk/testsuite.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-11-26 10:58:03 -0500 (Thu, 26 Nov 2009)
New Revision: 97034
Modified:
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
Restore default MC framework
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-11-26 15:53:09 UTC (rev 97033)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-11-26 15:58:03 UTC (rev 97034)
@@ -220,24 +220,6 @@
</dependency>
</dependencies>
</profile>
- <profile>
- <id>framework-equinox-default</id>
- <activation>
- <property>
- <name>!framework</name>
- </property>
- </activation>
- <properties>
- <jboss.osgi.framework.properties>jboss-osgi-equinox.properties</jboss.osgi.framework.properties>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
- <artifactId>jboss-osgi-runtime-equinox</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
- </profile>
<!--
Name: framework-felix
@@ -292,7 +274,7 @@
<id>framework-jbossmc-default</id>
<activation>
<property>
- <name>xframework</name>
+ <name>!framework</name>
</property>
</activation>
<dependencies>
14 years, 7 months
JBoss-OSGI SVN: r97033 - projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-11-26 10:53:09 -0500 (Thu, 26 Nov 2009)
New Revision: 97033
Modified:
projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java
Log:
Fix test compile issue
Modified: 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 2009-11-26 15:41:36 UTC (rev 97032)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java 2009-11-26 15:53:09 UTC (rev 97033)
@@ -30,7 +30,6 @@
import java.util.Collection;
import java.util.List;
-import org.jboss.osgi.blueprint.parser.BlueprintParser;
import org.jboss.osgi.blueprint.parser.xb.TActivation;
import org.jboss.osgi.blueprint.parser.xb.TAvailability;
import org.jboss.osgi.blueprint.parser.xb.TBean;
@@ -41,7 +40,6 @@
import org.jboss.osgi.blueprint.parser.xb.TServiceReference;
import org.jboss.osgi.blueprint.parser.xb.TTypeConverters;
import org.jboss.osgi.testing.OSGiTestHelper;
-import org.jboss.test.osgi.blueprint.MockBlueprintContext;
import org.junit.BeforeClass;
import org.junit.Test;
14 years, 7 months
JBoss-OSGI SVN: r97031 - in projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test: java/org/jboss/test/osgi/jbossxb/apitest and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-11-26 09:54:08 -0500 (Thu, 26 Nov 2009)
New Revision: 97031
Modified:
projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/BasicXMLBindingTestCase.java
projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/apitest/UnmarshallerTestCase.java
projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/booking.xml
Log:
Fix schema location registration
Modified: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/BasicXMLBindingTestCase.java
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/BasicXMLBindingTestCase.java 2009-11-26 14:42:11 UTC (rev 97030)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/BasicXMLBindingTestCase.java 2009-11-26 14:54:08 UTC (rev 97031)
@@ -102,7 +102,7 @@
URL xmlurl = bundle.getEntry("booking.xml");
assertNotNull("booking.xml available", xmlurl);
- unmarshaller.registerSchemaLocation(CourseBooking.NAMESPACE_XML_SIMPLE, xsdurl.toExternalForm());
+ unmarshaller.registerSchemaLocation("http://org.jboss.test.osgi.jbossxb.simple/booking.xsd", xsdurl.toExternalForm());
unmarshaller.addClassBinding(CourseBooking.NAMESPACE_XML_SIMPLE, CourseBooking.class);
CourseBooking booking = (CourseBooking)unmarshaller.unmarshal(xmlurl.toExternalForm());
Modified: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/apitest/UnmarshallerTestCase.java
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/apitest/UnmarshallerTestCase.java 2009-11-26 14:42:11 UTC (rev 97030)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/apitest/UnmarshallerTestCase.java 2009-11-26 14:54:08 UTC (rev 97031)
@@ -58,7 +58,7 @@
assertNotNull("booking.xml available", xmlurl);
JBossEntityResolver entityResolver = new JBossEntityResolver();
- entityResolver.registerLocalEntity(CourseBooking.NAMESPACE_XML_SIMPLE, xsdurl.toExternalForm());
+ entityResolver.registerLocalEntity("http://org.jboss.test.osgi.jbossxb.simple/booking.xsd", xsdurl.toExternalForm());
unmarshaller.setEntityResolver(entityResolver);
DefaultSchemaResolver schemaBindingResolver = new DefaultSchemaResolver();
Modified: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/booking.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/booking.xml 2009-11-26 14:42:11 UTC (rev 97030)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/booking.xml 2009-11-26 14:54:08 UTC (rev 97031)
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<course-booking xmlns="http://org.jboss.test.osgi.jbossxb.simple" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<course-booking xmlns="http://org.jboss.test.osgi.jbossxb.simple" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://org.jboss.test.osgi.jbossxb.simple http://org.jboss.test.osgi.jbossxb.simple/booking.xsd"
+ courseReference="Course100" courseDate="2009-11-26" invoiceReference="Ref100" totalPrice="100">
<company name="ACME Consulting">
<address>10 Coyote Avenue, Arizona, USA</address>
<contact name="Duke" email="duke(a)acme.com" telephone="1234567890" />
14 years, 7 months
JBoss-OSGI SVN: r97030 - in projects/jboss-osgi/trunk: testsuite and 2 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-11-26 09:42:11 -0500 (Thu, 26 Nov 2009)
New Revision: 97030
Modified:
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/capabilities/CapabilityTestCase.java
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
Update dependencies
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-11-26 14:41:11 UTC (rev 97029)
+++ projects/jboss-osgi/trunk/pom.xml 2009-11-26 14:42:11 UTC (rev 97030)
@@ -49,7 +49,7 @@
<version.apache.felix.log>1.0.0</version.apache.felix.log>
<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.SP2</version.jboss.osgi.apache.xerces>
+ <version.jboss.osgi.apache.xerces>2.9.1-SNAPSHOT</version.jboss.osgi.apache.xerces>
<version.jboss.osgi.blueprint>1.0.0.Alpha3</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>
@@ -57,7 +57,7 @@
<version.jboss.osgi.framework>1.0.0.Alpha2-SNAPSHOT</version.jboss.osgi.framework>
<version.jboss.osgi.hotdeploy>1.0.3</version.jboss.osgi.hotdeploy>
<version.jboss.osgi.husky>1.0.2-SNAPSHOT</version.jboss.osgi.husky>
- <version.jboss.osgi.jaxb>2.1.10.SP2</version.jboss.osgi.jaxb>
+ <version.jboss.osgi.jaxb>2.1.10-SNAPSHOT</version.jboss.osgi.jaxb>
<version.jboss.osgi.jmx>1.0.2</version.jboss.osgi.jmx>
<version.jboss.osgi.jndi>1.0.1</version.jboss.osgi.jndi>
<version.jboss.osgi.jta>1.0.0</version.jboss.osgi.jta>
@@ -69,7 +69,7 @@
<version.jboss.osgi.spi>1.0.3-SNAPSHOT</version.jboss.osgi.spi>
<version.jboss.osgi.webapp>0.7.2-SNAPSHOT</version.jboss.osgi.webapp>
<version.jboss.osgi.webconsole>1.0.2</version.jboss.osgi.webconsole>
- <version.jboss.osgi.xml.binding>2.0.1-SNAPSHOT</version.jboss.osgi.xml.binding>
+ <version.jboss.osgi.xml.binding>2.0.2-SNAPSHOT</version.jboss.osgi.xml.binding>
<version.ops4j.pax.web>0.7.2-SNAPSHOT</version.ops4j.pax.web>
<version.osgi>4.2.0</version.osgi>
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties 2009-11-26 14:41:11 UTC (rev 97029)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties 2009-11-26 14:42:11 UTC (rev 97030)
@@ -32,11 +32,11 @@
org.jboss.osgi.spi.management;version=1.0, \
org.jboss.osgi.spi.service;version=1.0, \
org.jboss.osgi.spi.util;version=1.0, \
- 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.virtual;version=2.1, \
+ org.jboss.virtual.plugins.registry;version=2.1, \
+ org.jboss.virtual.plugins.context.jar;version=2.1, \
+ org.jboss.virtual.plugins.vfs.helpers;version=2.1, \
+ org.jboss.virtual.protocol;version=2.1, \
org.osgi.framework;version=1.5
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/capabilities/CapabilityTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/capabilities/CapabilityTestCase.java 2009-11-26 14:41:11 UTC (rev 97029)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/capabilities/CapabilityTestCase.java 2009-11-26 14:42:11 UTC (rev 97030)
@@ -35,8 +35,8 @@
import org.jboss.osgi.jaxb.JAXBCapability;
import org.jboss.osgi.jaxb.JAXBService;
+import org.jboss.osgi.jbossxb.UnmarshallerService;
import org.jboss.osgi.jbossxb.XMLBindingCapability;
-import org.jboss.osgi.jbossxb.XMLBindingService;
import org.jboss.osgi.jmx.JMXCapability;
import org.jboss.osgi.jndi.JNDICapability;
import org.jboss.osgi.spi.capability.LogServiceCapability;
@@ -128,8 +128,8 @@
runtime.addCapability(new XMLBindingCapability());
- OSGiServiceReference saxRef = runtime.getServiceReference(XMLBindingService.class.getName());
- assertNotNull("XMLBindingService registered", saxRef);
+ OSGiServiceReference saxRef = runtime.getServiceReference(UnmarshallerService.class.getName());
+ assertNotNull("UnmarshallerService registered", saxRef);
}
finally
{
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-11-26 14:41:11 UTC (rev 97029)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-11-26 14:42:11 UTC (rev 97030)
@@ -130,9 +130,19 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-microcontainer</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-webapp</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-xml-binding</artifactId>
+ <scope>provided</scope>
+ </dependency>
<!-- OPS4J -->
<dependency>
14 years, 7 months
JBoss-OSGI SVN: r97029 - in projects/jboss-osgi/projects/bundles/microcontainer/trunk: src/main/java/org/jboss/osgi/microcontainer and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-11-26 09:41:11 -0500 (Thu, 26 Nov 2009)
New Revision: 97029
Modified:
projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml
projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java
projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
Log:
Fix exports for BP
Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml 2009-11-26 14:39:22 UTC (rev 97028)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml 2009-11-26 14:41:11 UTC (rev 97029)
@@ -39,19 +39,47 @@
<!-- Properties -->
<properties>
+ <version.javassist>3.9.0.GA</version.javassist>
<version.jboss.deployers>2.0.5.SP1</version.jboss.deployers>
<version.jboss.microcontainer>2.0.9.GA</version.jboss.microcontainer>
<version.jboss.osgi.runtime.deployers>1.0.3</version.jboss.osgi.runtime.deployers>
<version.jboss.osgi.deployment>1.0.0</version.jboss.osgi.deployment>
<version.jboss.osgi.jmx>1.0.2</version.jboss.osgi.jmx>
<version.jboss.osgi.spi>1.0.3</version.jboss.osgi.spi>
- <version.jboss.osgi.xml.binding>2.0.1.SP1</version.jboss.osgi.xml.binding>
+ <version.jboss.reflect>2.0.2.GA</version.jboss.reflect>
+ <version.jboss.xb>2.0.2.Beta3</version.jboss.xb>
<version.osgi>4.2.0</version.osgi>
</properties>
<!-- Dependencies -->
<dependencies>
<dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>${version.javassist}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs</artifactId>
+ <version>${version.jboss.deployers}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ <version>${version.jboss.xb}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-spi</artifactId>
<version>${version.jboss.osgi.spi}</version>
@@ -62,11 +90,6 @@
<version>${version.jboss.osgi.jmx}</version>
</dependency>
<dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-xml-binding</artifactId>
- <version>${version.jboss.osgi.xml.binding}</version>
- </dependency>
- <dependency>
<groupId>org.jboss.osgi.runtime</groupId>
<artifactId>jboss-osgi-deployers</artifactId>
<version>${version.jboss.osgi.runtime.deployers}</version>
@@ -77,17 +100,6 @@
<version>${version.jboss.osgi.deployment}</version>
</dependency>
- <dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-vfs</artifactId>
- <version>${version.jboss.deployers}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
- <version>${version.jboss.microcontainer}</version>
- </dependency>
-
<!-- Provided Dependencies -->
<dependency>
<groupId>org.osgi</groupId>
@@ -134,23 +146,12 @@
org.osgi.util.tracker,
<!-- import -->
- javassist*,
- org.jboss.beans.info.*,
- org.jboss.classadapter.spi,
- org.jboss.config.*,
- org.jboss.deployers.*,
- org.jboss.joinpoint.*,
org.jboss.logging,
- org.jboss.osgi.common.log;version=1.0,
- org.jboss.osgi.deployment.deployer,
- org.jboss.osgi.jbossxb;version=2.0,
+ org.jboss.osgi.deployment.deployer;version=1.0,
org.jboss.osgi.spi;version=1.0,
org.jboss.osgi.spi.management;version=1.0,
org.jboss.osgi.spi.util;version=1.0,
- org.jboss.reflect.*,
- org.jboss.util.*,
- org.jboss.virtual*,
- org.jboss.xb.*,
+ org.jboss.virtual;version="[2.1,2.2)",
<!-- optional -->
@@ -161,6 +162,7 @@
<DynamicImport-Package>*</DynamicImport-Package>
<Embed-Transitive>true</Embed-Transitive>
<Embed-Dependency>
+ javassist;inline=false,
jboss-classloader;inline=false,
jboss-classloading;inline=false,
jboss-classloading-spi;inline=false,
@@ -179,12 +181,15 @@
jboss-metatype;inline=false,
jboss-mdr;inline=false,
jboss-osgi-deployers;inline=false,
+ jboss-reflect;inline=false,
jboss-kernel;inline=false,
+ jbossxb;inline=false,
</Embed-Dependency>
<_exportcontents>
+ org.jboss.beans.metadata*;version=2.0.9,
+ org.jboss.dependency.spi*;version=2.0.9,
org.jboss.kernel.spi*;version=2.0.9,
- org.jboss.dependency*;version=2.0.9,
- org.jboss.deployers*;version=2.0.5,
+ org.jboss.reflect.spi;version=2.0.2,
</_exportcontents>
</instructions>
</configuration>
Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java 2009-11-26 14:39:22 UTC (rev 97028)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java 2009-11-26 14:41:11 UTC (rev 97029)
@@ -23,7 +23,6 @@
//$Id$
-import org.jboss.osgi.jbossxb.XMLBindingCapability;
import org.jboss.osgi.jmx.JMXCapability;
import org.jboss.osgi.spi.capability.Capability;
import org.jboss.osgi.spi.service.MicrocontainerService;
@@ -45,7 +44,6 @@
{
super(MicrocontainerService.class.getName());
- addDependency(new XMLBindingCapability());
addDependency(new JMXCapability());
addBundle("bundles/jboss-osgi-microcontainer.jar");
Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java 2009-11-26 14:39:22 UTC (rev 97028)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java 2009-11-26 14:41:11 UTC (rev 97029)
@@ -23,24 +23,17 @@
//$Id$
-import static org.osgi.framework.Constants.OBJECTCLASS;
-
import java.net.URL;
-import java.util.Arrays;
-import java.util.List;
import javax.management.MBeanServer;
import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.dependency.KernelController;
-import org.jboss.osgi.jbossxb.XMLBindingService;
import org.jboss.osgi.microcontainer.AbstractMicrocontainerService;
import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;
import org.jboss.osgi.spi.service.MicrocontainerService;
import org.jboss.virtual.VFS;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.Filter;
-import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceReference;
import org.osgi.util.tracker.ServiceTracker;
@@ -82,54 +75,28 @@
installBean(controller, BEAN_KERNEL, kernel);
installBean(controller, BEAN_KERNEL_CONTROLLER, controller);
- // Setup a filter to track both services
- Filter filter;
- try
- {
- String jmxService = "(" + OBJECTCLASS + "=" + MBeanServer.class.getName() + ")";
- String xmlService = "(" + OBJECTCLASS + "=" + XMLBindingService.class.getName() + ")";
- filter = context.createFilter("(|" + jmxService + xmlService + ")");
- }
- catch (InvalidSyntaxException ex)
- {
- throw new IllegalArgumentException("Invalid filter syntax");
- }
-
// Register the MicrocontainerServiceMBean
- ServiceTracker tracker = new ServiceTracker(context, filter, null)
+ ServiceTracker tracker = new ServiceTracker(context, MBeanServer.class.getName(), null)
{
- XMLBindingService xmlService;
- MBeanServer mbeanServer;
-
@Override
public Object addingService(ServiceReference sref)
{
- Object service = super.addingService(sref);
-
- List<String> classList = Arrays.asList((String[])sref.getProperty(OBJECTCLASS));
- if (classList.contains(MBeanServer.class.getName()))
- mbeanServer = (MBeanServer)service;
+ MBeanServer mbeanServer = (MBeanServer)super.addingService(sref);
- if (classList.contains(XMLBindingService.class.getName()))
- xmlService = (XMLBindingService)service;
+ // Install the MBeanServer
+ installBean(controller, BEAN_MBEAN_SERVER, mbeanServer);
- if (mbeanServer != null && xmlService != null)
- {
- // Install the MBeanServer
- installBean(controller, BEAN_MBEAN_SERVER, mbeanServer);
+ // Deploy the deployer beans
+ URL deployersURL = context.getBundle().getResource("META-INF/base-deployers-beans.xml");
+ deployer.deploy(deployersURL);
- // Deploy the deployer beans
- URL deployersURL = context.getBundle().getResource("META-INF/base-deployers-beans.xml");
- deployer.deploy(deployersURL);
+ // Register the MicrocontainerService
+ context.registerService(MicrocontainerService.class.getName(), mcServiceImpl, null);
- // Register the MicrocontainerService
- context.registerService(MicrocontainerService.class.getName(), mcServiceImpl, null);
+ // Register the MicrocontainerServiceMBean
+ registerMicrocontainerServiceMBean(mbeanServer);
- // Register the MicrocontainerServiceMBean
- registerMicrocontainerServiceMBean(mbeanServer);
- }
-
- return service;
+ return mbeanServer;
}
};
tracker.open();
14 years, 7 months
JBoss-OSGI SVN: r97028 - in projects/jboss-osgi/projects/bundles/jaxb/trunk: src/main/java/org/jboss/osgi/jaxb and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-11-26 09:39:22 -0500 (Thu, 26 Nov 2009)
New Revision: 97028
Modified:
projects/jboss-osgi/projects/bundles/jaxb/trunk/pom.xml
projects/jboss-osgi/projects/bundles/jaxb/trunk/src/main/java/org/jboss/osgi/jaxb/JAXBCapability.java
projects/jboss-osgi/projects/bundles/jaxb/trunk/src/main/java/org/jboss/osgi/jaxb/internal/JAXBServiceActivator.java
Log:
Remove dependency on osgi.common.log
Modified: projects/jboss-osgi/projects/bundles/jaxb/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/jaxb/trunk/pom.xml 2009-11-26 14:38:14 UTC (rev 97027)
+++ projects/jboss-osgi/projects/bundles/jaxb/trunk/pom.xml 2009-11-26 14:39:22 UTC (rev 97028)
@@ -39,7 +39,7 @@
<!-- Properties -->
<properties>
- <version.jboss.osgi.apache.xerces>2.9.1.SP2</version.jboss.osgi.apache.xerces>
+ <version.jboss.osgi.apache.xerces>2.9.1-SNAPSHOT</version.jboss.osgi.apache.xerces>
<version.xml.bind>2.1.10</version.xml.bind>
<version.osgi>4.2.0</version.osgi>
</properties>
@@ -86,7 +86,7 @@
org.jboss.osgi.jaxb.internal
</Private-Package>
<Export-Package>
- org.jboss.osgi.jaxb;version=${version.xml.bind}
+ org.jboss.osgi.jaxb;version=2.1.10
</Export-Package>
<Import-Package>
<!-- system -->
@@ -100,7 +100,6 @@
org.xml.sax*,
<!-- import -->
- org.jboss.osgi.common.log;version=1.0,
org.jboss.osgi.spi.capability;version=1.0,
org.jboss.osgi.spi.util;version=1.0,
org.jboss.osgi.xml,
Modified: projects/jboss-osgi/projects/bundles/jaxb/trunk/src/main/java/org/jboss/osgi/jaxb/JAXBCapability.java
===================================================================
--- projects/jboss-osgi/projects/bundles/jaxb/trunk/src/main/java/org/jboss/osgi/jaxb/JAXBCapability.java 2009-11-26 14:38:14 UTC (rev 97027)
+++ projects/jboss-osgi/projects/bundles/jaxb/trunk/src/main/java/org/jboss/osgi/jaxb/JAXBCapability.java 2009-11-26 14:39:22 UTC (rev 97028)
@@ -24,12 +24,10 @@
//$Id$
import org.jboss.osgi.spi.capability.Capability;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
import org.jboss.osgi.xml.XMLParserCapability;
/**
- * Adds the JAXB capability to the {@link OSGiRuntime}
- * under test.
+ * Adds the JAXB capability.
*
* It is ignored if the {@link JAXBService} is already registered.
*
Modified: projects/jboss-osgi/projects/bundles/jaxb/trunk/src/main/java/org/jboss/osgi/jaxb/internal/JAXBServiceActivator.java
===================================================================
--- projects/jboss-osgi/projects/bundles/jaxb/trunk/src/main/java/org/jboss/osgi/jaxb/internal/JAXBServiceActivator.java 2009-11-26 14:38:14 UTC (rev 97027)
+++ projects/jboss-osgi/projects/bundles/jaxb/trunk/src/main/java/org/jboss/osgi/jaxb/internal/JAXBServiceActivator.java 2009-11-26 14:39:22 UTC (rev 97028)
@@ -23,14 +23,12 @@
//$Id$
-import org.jboss.osgi.common.log.LogServiceTracker;
import org.jboss.osgi.jaxb.JAXBService;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceFactory;
import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.log.LogService;
/**
* A BundleActivator for JAXB related services
@@ -40,12 +38,8 @@
*/
public class JAXBServiceActivator implements BundleActivator
{
- private LogService log;
-
public void start(BundleContext context)
{
- log = new LogServiceTracker(context);
-
ServiceFactory factory = new ServiceFactory()
{
public Object getService(Bundle bundle, ServiceRegistration registration)
@@ -58,7 +52,6 @@
}
};
context.registerService(JAXBService.class.getName(), factory, null);
- log.log(LogService.LOG_INFO, "JAXBService registered");
}
public void stop(BundleContext context)
14 years, 7 months
JBoss-OSGI SVN: r97027 - in projects/jboss-osgi/projects/bundles/husky/trunk: src/test/resources and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-11-26 09:38:14 -0500 (Thu, 26 Nov 2009)
New Revision: 97027
Modified:
projects/jboss-osgi/projects/bundles/husky/trunk/pom.xml
projects/jboss-osgi/projects/bundles/husky/trunk/src/test/resources/jboss-osgi-framework.properties
Log:
Fix VFS import
Modified: projects/jboss-osgi/projects/bundles/husky/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/pom.xml 2009-11-26 14:36:24 UTC (rev 97026)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/pom.xml 2009-11-26 14:38:14 UTC (rev 97027)
@@ -116,6 +116,7 @@
org.jboss.osgi.spi.capability;version="[1.0,1.1)",
org.jboss.osgi.spi.management;version="[1.0,1.1)",
org.jboss.osgi.spi.util;version="[1.0,1.1)",
+ org.jboss.virtual;version="[2.1,2.2)",
org.junit;version="[4.6,5.0)",
org.osgi.framework,
org.osgi.util.tracker,
@@ -124,7 +125,6 @@
<!-- ignore client side -->
!org.jboss.osgi.deployment.deployer,
!org.jboss.osgi.spi.framework,
- !org.jboss.virtual,
!org.osgi.framework.launch,
!org.osgi.service.packageadmin,
</Import-Package>
Modified: projects/jboss-osgi/projects/bundles/husky/trunk/src/test/resources/jboss-osgi-framework.properties
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/src/test/resources/jboss-osgi-framework.properties 2009-11-26 14:36:24 UTC (rev 97026)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/src/test/resources/jboss-osgi-framework.properties 2009-11-26 14:38:14 UTC (rev 97027)
@@ -23,6 +23,7 @@
org.jboss.osgi.spi.management;version=1.0, \
org.jboss.osgi.spi.service;version=1.0, \
org.jboss.osgi.spi.util;version=1.0, \
+ org.jboss.virtual;version=2.1, \
org.osgi.framework;version=1.5, \
org.slf4j;version=1.5
14 years, 7 months
JBoss-OSGI SVN: r97026 - projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-11-26 09:36:24 -0500 (Thu, 26 Nov 2009)
New Revision: 97026
Added:
projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/AbstractParserTestCase.java
Log:
BP integration tests now part of the main BP build
Added: 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 (rev 0)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/AbstractParserTestCase.java 2009-11-26 14:36:24 UTC (rev 97026)
@@ -0,0 +1,65 @@
+/*
+ * 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(a)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
Property changes on: projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/AbstractParserTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
14 years, 7 months
JBoss-OSGI SVN: r97025 - in projects/jboss-osgi/trunk/reactor/blueprint: scripts and 5 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-11-26 09:35:19 -0500 (Thu, 26 Nov 2009)
New Revision: 97025
Added:
projects/jboss-osgi/trunk/reactor/blueprint/scripts/
projects/jboss-osgi/trunk/reactor/blueprint/src/main/
projects/jboss-osgi/trunk/reactor/blueprint/src/test/
projects/jboss-osgi/trunk/reactor/blueprint/src/test/resources/jboss-osgi-framework.properties
Removed:
projects/jboss-osgi/trunk/reactor/blueprint/impl/
projects/jboss-osgi/trunk/reactor/blueprint/src/site/
projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/MockBlueprintContext.java
projects/jboss-osgi/trunk/reactor/blueprint/src/test/resources/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/reactor/blueprint/testsuite/
Modified:
projects/jboss-osgi/trunk/reactor/blueprint/.classpath
projects/jboss-osgi/trunk/reactor/blueprint/pom.xml
projects/jboss-osgi/trunk/reactor/blueprint/scripts/antrun-test-jars.xml
projects/jboss-osgi/trunk/reactor/blueprint/scripts/assembly-bundles.xml
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/SchemaResolverParser.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
Log:
BP integration tests now part of the main BP build
Modified: projects/jboss-osgi/trunk/reactor/blueprint/.classpath
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/.classpath 2009-11-26 14:23:15 UTC (rev 97024)
+++ projects/jboss-osgi/trunk/reactor/blueprint/.classpath 2009-11-26 14:35:19 UTC (rev 97025)
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
Modified: projects/jboss-osgi/trunk/reactor/blueprint/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/pom.xml 2009-11-26 14:23:15 UTC (rev 97024)
+++ projects/jboss-osgi/trunk/reactor/blueprint/pom.xml 2009-11-26 14:35:19 UTC (rev 97025)
@@ -10,18 +10,18 @@
<!-- ====================================================================== -->
<!-- $Id$ -->
-
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>JBossOSGi Reactor - Blueprint</name>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-blueprint-parent</artifactId>
- <packaging>pom</packaging>
+ <artifactId>jboss-osgi-blueprint</artifactId>
+ <packaging>bundle</packaging>
<version>1.0.0.Alpha3</version>
-
+
<!-- Parent -->
<parent>
<groupId>org.jboss.osgi</groupId>
@@ -30,16 +30,253 @@
<relativePath>../../pom.xml</relativePath>
</parent>
- <!-- Modules -->
- <modules>
- <module>impl</module>
- <module>testsuite</module>
- </modules>
-
<!-- Properties -->
<properties>
</properties>
-
+
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.osgi.runtime</groupId>
+ <artifactId>jboss-osgi-deployment</artifactId>
+ </dependency>
+
+ <!-- Provided 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>
+ <artifactId>jboss-osgi-apache-xerces</artifactId>
+ <scope>provided</scope>
+ </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-microcontainer</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-xml-binding</artifactId>
+ <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.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <!-- Build -->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
+ <Bundle-Activator>org.jboss.osgi.blueprint.extender.BlueprintActivator</Bundle-Activator>
+ <Private-Package>
+ org.jboss.osgi.blueprint.*
+ </Private-Package>
+ <Export-Package>
+ org.jboss.osgi.blueprint;version=1.0.0,
+ org.osgi.service.blueprint.*;version=1.0
+ </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>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <!-- For some reason the distribution javadoc module needs this -->
+ <file>target/${artifactId}-${version}-sources.jar</file>
+ <classifier>sources</classifier>
+ <type>jar</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>bundles</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>directory-single</goal>
+ </goals>
+ <configuration>
+ <finalName>test-libs</finalName>
+ <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-bundles.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ <execution>
+ <id>compendium</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>directory-single</goal>
+ </goals>
+ <configuration>
+ <finalName>test-libs</finalName>
+ <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-compendium.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>build-test-jars</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
+ <property name="artifactId" value="${artifactId}" />
+ <property name="tests.output.dir" value="${project.build.directory}" />
+ <property name="build.artifact" value="${project.build.finalName}" />
+ <ant antfile="scripts/antrun-test-jars.xml" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <id>surefire-integration-tests</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ <argLine>${surefire.jpda.args}</argLine>
+ <systemProperties>
+ <property>
+ <name>java.protocol.handler.pkgs</name>
+ <value>org.jboss.net.protocol|org.jboss.virtual.protocol</value>
+ </property>
+ <property>
+ <name>log4j.output.dir</name>
+ <value>${project.build.directory}</value>
+ </property>
+ <property>
+ <name>org.jboss.osgi.husky.Invoker</name>
+ <value>org.jboss.osgi.husky.internal.OSGiInvoker</value>
+ </property>
+ <property>
+ <name>test.archive.directory</name>
+ <value>${project.build.directory}/test-libs</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
<!-- Profiles -->
<profiles>
@@ -62,6 +299,16 @@
<scope>provided</scope>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</profile>
<!--
@@ -84,32 +331,32 @@
</dependency>
</dependencies>
</profile>
-
- <!--
- Name: framework-jbossmc
- Descr: Setup for JBossMC framework integration testing
- -->
<profile>
- <id>framework-jbossmc</id>
+ <id>framework-felix-default</id>
<activation>
<property>
- <name>framework</name>
- <value>jbossmc</value>
+ <name>!framework</name>
</property>
</activation>
<dependencies>
<dependency>
<groupId>org.jboss.osgi.runtime</groupId>
- <artifactId>jboss-osgi-framework</artifactId>
+ <artifactId>jboss-osgi-runtime-felix</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
+
+ <!--
+ Name: framework-jbossmc
+ Descr: Setup for JBossMC framework integration testing
+ -->
<profile>
- <id>framework-default</id>
+ <id>framework-jbossmc</id>
<activation>
<property>
- <name>!framework</name>
+ <name>framework</name>
+ <value>jbossmc</value>
</property>
</activation>
<dependencies>
@@ -119,7 +366,11 @@
<scope>provided</scope>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ </plugins>
+ </build>
</profile>
</profiles>
-
+
</project>
Copied: projects/jboss-osgi/trunk/reactor/blueprint/scripts (from rev 97013, projects/jboss-osgi/trunk/reactor/blueprint/testsuite/scripts)
Modified: projects/jboss-osgi/trunk/reactor/blueprint/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/scripts/antrun-test-jars.xml 2009-11-26 07:32:06 UTC (rev 97013)
+++ projects/jboss-osgi/trunk/reactor/blueprint/scripts/antrun-test-jars.xml 2009-11-26 14:35:19 UTC (rev 97025)
@@ -32,6 +32,9 @@
</classpath>
</taskdef>
+ <!-- Copy build artifact to test-libs/bundles -->
+ <copy file="${tests.output.dir}/${build.artifact}.jar" tofile="${tests.output.dir}/test-libs/bundles/${artifactId}.jar" overwrite="true"/>
+
</target>
<!-- ================================================================== -->
Modified: projects/jboss-osgi/trunk/reactor/blueprint/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/scripts/assembly-bundles.xml 2009-11-26 07:32:06 UTC (rev 97013)
+++ projects/jboss-osgi/trunk/reactor/blueprint/scripts/assembly-bundles.xml 2009-11-26 14:35:19 UTC (rev 97025)
@@ -15,7 +15,6 @@
<outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
<includes>
<include>*:jboss-osgi-apache-xerces:jar</include>
- <include>*:jboss-osgi-blueprint:jar</include>
<include>*:jboss-osgi-common:jar</include>
<include>*:jboss-osgi-common-core:jar</include>
<include>*:jboss-osgi-deployment:jar</include>
Copied: projects/jboss-osgi/trunk/reactor/blueprint/src/main (from rev 97013, projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main)
Modified: projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java 2009-11-26 07:32:06 UTC (rev 97013)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java 2009-11-26 14:35:19 UTC (rev 97025)
@@ -52,7 +52,6 @@
public BlueprintParser(BlueprintContext context)
{
this.context = context;
-
this.parser = new SchemaResolverParser(context);
}
Modified: projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/SchemaResolverParser.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/SchemaResolverParser.java 2009-11-26 07:32:06 UTC (rev 97013)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/SchemaResolverParser.java 2009-11-26 14:35:19 UTC (rev 97025)
@@ -23,16 +23,15 @@
//$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.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;
+import org.jboss.osgi.jbossxb.UnmarshallerService;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
/**
* The Blueprint descriptor parser.
@@ -42,8 +41,11 @@
*/
public class SchemaResolverParser implements JBossXBParser
{
- public SchemaResolverParser(BlueprintContext context)
+ private BlueprintContext bpContext;
+
+ public SchemaResolverParser(BlueprintContext bpContext)
{
+ this.bpContext = bpContext;
}
/*
@@ -54,39 +56,29 @@
if (xmlURL == null)
throw new IllegalArgumentException("Cannot parse null descriptor URL");
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ 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
{
- ClassLoader bundleCL = getClass().getClassLoader();
- Thread.currentThread().setContextClassLoader(bundleCL);
-
- Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
unmarshaller.setSchemaValidation(true);
unmarshaller.setNamespaceAware(true);
unmarshaller.setValidation(true);
-
- // This is EntityResolver that SAX parser (xerces) will use to resolve XSD location for the XML being parsed
- // Here we map schema location specified in the XSD file to the local schema location,
- // which is a path relative to the resources directory visible in the classpath.
- JBossEntityResolver xmlResolver = new JBossEntityResolver();
- xmlResolver.registerLocalEntity("http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd", "schema/blueprint.xsd");
- unmarshaller.setEntityResolver(xmlResolver);
-
- // This is to resolve namespace to class mapping and build the SchemaBinding from the class
- DefaultSchemaResolver schemaBindingResolver = new DefaultSchemaResolver();
- schemaBindingResolver.addClassBinding(BlueprintContext.XMLNS_BLUEPRINT, TBlueprint.class);
-
- TBlueprint tBlueprint = (TBlueprint)unmarshaller.unmarshal(xmlURL.toExternalForm(), schemaBindingResolver);
+ 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 (JBossXBException ex)
+ catch (IOException ex)
{
throw new BlueprintException("Cannot parse blueprint descriptor: " + xmlURL, ex);
}
- finally
- {
- Thread.currentThread().setContextClassLoader(ctxLoader);
- }
}
}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/reactor/blueprint/src/test (from rev 97013, projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test)
Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/MockBlueprintContext.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/MockBlueprintContext.java 2009-11-26 07:32:06 UTC (rev 97013)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/MockBlueprintContext.java 2009-11-26 14:35:19 UTC (rev 97025)
@@ -1,100 +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;
-
-//$Id$
-
-import org.jboss.osgi.blueprint.BlueprintContext;
-import org.jboss.osgi.blueprint.parser.BlueprintParser;
-import org.jboss.osgi.spi.NotImplementedException;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.log.LogService;
-
-/**
- * A mock {@link BlueprintContext}
- *
- * @author thomas.diesler(a)jboss.com
- * @since 13-May-2009
- */
-public class MockBlueprintContext implements BlueprintContext
-{
- public BlueprintParser getBlueprintParser()
- {
- throw new NotImplementedException();
- }
-
- public BundleContext getBundleContext()
- {
- throw new NotImplementedException();
- }
-
- public LogService getLog()
- {
- return new LogService()
- {
- public void log(int level, String message)
- {
- System.out.println(logLevel(level) + " - " + message);
- }
-
- public void log(int level, String message, Throwable ex)
- {
- System.out.println(logLevel(level) + " - " + message);
- ex.printStackTrace(System.out);
- }
-
- public void log(ServiceReference arg0, int arg1, String arg2)
- {
- throw new NotImplementedException();
- }
-
- public void log(ServiceReference arg0, int arg1, String arg2, Throwable arg3)
- {
- throw new NotImplementedException();
- }
- };
- }
-
- private String logLevel(int level)
- {
- String logLevel;
- switch (level)
- {
- case LogService.LOG_DEBUG:
- logLevel = "DEBUG";
- break;
- case LogService.LOG_INFO:
- logLevel = "INFO";
- break;
- case LogService.LOG_WARNING:
- logLevel = "WARN";
- break;
- case LogService.LOG_ERROR:
- logLevel = "ERROR";
- break;
- default:
- logLevel = "Level=" + level;
- }
- return logLevel;
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java 2009-11-26 07:32:06 UTC (rev 97013)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/AllElementsParserTestCase.java 2009-11-26 14:35:19 UTC (rev 97025)
@@ -51,15 +51,15 @@
* @author thomas.diesler(a)jboss.com
* @since 13-May-2009
*/
-public class AllElementsParserTestCase
+public class AllElementsParserTestCase extends AbstractParserTestCase
{
private static TBlueprint blueprint;
@BeforeClass
- public static void beforeClass()
+ public static void beforeClass() throws Exception
{
URL xmlURL = new OSGiTestHelper().getResourceURL("parser/blueprint-all-elements.xml");
- blueprint = new BlueprintParser(new MockBlueprintContext()).parse(xmlURL);
+ blueprint = new AllElementsParserTestCase().parse(xmlURL);
}
@Test
Modified: projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicBeansParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicBeansParserTestCase.java 2009-11-26 07:32:06 UTC (rev 97013)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicBeansParserTestCase.java 2009-11-26 14:35:19 UTC (rev 97025)
@@ -26,18 +26,13 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import java.net.URL;
import java.util.List;
-import org.jboss.osgi.blueprint.parser.BlueprintParser;
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.testing.OSGiTestHelper;
-import org.jboss.test.osgi.blueprint.MockBlueprintContext;
import org.jboss.test.osgi.blueprint.parser.common.BeanA;
import org.jboss.test.osgi.blueprint.parser.common.BeanB;
-import org.junit.BeforeClass;
import org.junit.Test;
/**
@@ -46,28 +41,21 @@
* @author thomas.diesler(a)jboss.com
* @since 13-May-2009
*/
-public class BasicBeansParserTestCase
+public class BasicBeansParserTestCase extends AbstractParserTestCase
{
- static TBlueprint blueprint;
-
- @BeforeClass
- public static void beforeClass()
- {
- URL xmlURL = new OSGiTestHelper().getResourceURL("parser/blueprint-basic-beans.xml");
- blueprint = new BlueprintParser(new MockBlueprintContext()).parse(xmlURL);
- }
-
@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());
Modified: projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java 2009-11-26 07:32:06 UTC (rev 97013)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BasicServiceParserTestCase.java 2009-11-26 14:35:19 UTC (rev 97025)
@@ -26,21 +26,15 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import java.net.URL;
import java.util.List;
-import org.jboss.osgi.blueprint.parser.BlueprintParser;
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.osgi.testing.OSGiTest;
-import org.jboss.osgi.testing.OSGiTestHelper;
-import org.jboss.test.osgi.blueprint.MockBlueprintContext;
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.BeforeClass;
import org.junit.Test;
/**
@@ -49,37 +43,30 @@
* @author thomas.diesler(a)jboss.com
* @since 13-May-2009
*/
-public class BasicServiceParserTestCase extends OSGiTest
+public class BasicServiceParserTestCase extends AbstractParserTestCase
{
- static TBlueprint blueprint;
-
- @BeforeClass
- public static void beforeClass()
- {
- URL xmlURL = new OSGiTestHelper().getResourceURL("parser/blueprint-basic-service.xml");
- blueprint = new BlueprintParser(new MockBlueprintContext()).parse(xmlURL);
- }
-
@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));
Modified: projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BlueprintContainerParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/BlueprintContainerParserTestCase.java 2009-11-26 07:32:06 UTC (rev 97013)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/BlueprintContainerParserTestCase.java 2009-11-26 14:35:19 UTC (rev 97025)
@@ -31,14 +31,12 @@
import javax.management.MBeanServer;
-import org.jboss.osgi.blueprint.parser.BlueprintParser;
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.MockBlueprintContext;
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;
@@ -52,15 +50,15 @@
* @author thomas.diesler(a)jboss.com
* @since 13-May-2009
*/
-public class BlueprintContainerParserTestCase
+public class BlueprintContainerParserTestCase extends AbstractParserTestCase
{
private static TBlueprint blueprint;
@BeforeClass
- public static void beforeClass()
+ public static void beforeClass() throws Exception
{
URL xmlURL = new OSGiTestHelper().getResourceURL("container/OSGI-INF/blueprint/basic-service.xml");
- blueprint = new BlueprintParser(new MockBlueprintContext()).parse(xmlURL);
+ blueprint = new BlueprintContainerParserTestCase().parse(xmlURL);
}
@Test
Modified: projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/RootElementParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/parser/RootElementParserTestCase.java 2009-11-26 07:32:06 UTC (rev 97013)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/RootElementParserTestCase.java 2009-11-26 14:35:19 UTC (rev 97025)
@@ -26,14 +26,10 @@
import static org.junit.Assert.assertEquals;
import java.math.BigInteger;
-import java.net.URL;
-import org.jboss.osgi.blueprint.parser.BlueprintParser;
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.jboss.osgi.testing.OSGiTestHelper;
-import org.jboss.test.osgi.blueprint.MockBlueprintContext;
import org.junit.Test;
/**
@@ -42,13 +38,12 @@
* @author thomas.diesler(a)jboss.com
* @since 13-May-2009
*/
-public class RootElementParserTestCase
+public class RootElementParserTestCase extends AbstractParserTestCase
{
@Test
public void testBlueprintDefaultAttributes() throws Exception
{
- URL xmlURL = new OSGiTestHelper().getResourceURL("parser/blueprint-root-defaults.xml");
- TBlueprint blueprint = new BlueprintParser(new MockBlueprintContext()).parse(xmlURL);
+ TBlueprint blueprint = parse(getResourceURL("parser/blueprint-root-defaults.xml"));
// assert default attributes
assertEquals("availability", TAvailability.mandatory, blueprint.getDefaultAvailability());
@@ -59,8 +54,7 @@
@Test
public void testBlueprintDescription() throws Exception
{
- URL xmlURL = new OSGiTestHelper().getResourceURL("parser/blueprint-basic-root.xml");
- TBlueprint blueprint = new BlueprintParser(new MockBlueprintContext()).parse(xmlURL);
+ TBlueprint blueprint = parse(getResourceURL("parser/blueprint-basic-root.xml"));
// assert default attributes
assertEquals("availability", TAvailability.optional, blueprint.getDefaultAvailability());
Deleted: projects/jboss-osgi/trunk/reactor/blueprint/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties 2009-11-26 07:32:06 UTC (rev 97013)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/resources/jboss-osgi-felix.properties 2009-11-26 14:35:19 UTC (rev 97025)
@@ -1,46 +0,0 @@
-#
-# Properties read by the org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
-#
-# $Id$
-#
-
-# The OSGiFramework implementation
-org.jboss.osgi.spi.framework.impl=org.jboss.osgi.felix.framework.FelixIntegration
-
-# Properties to configure the Framework
-org.osgi.framework.storage=${test.archive.directory}/../osgi-store
-org.osgi.framework.storage.clean=onFirstInit
-
-# Framework bootdelegation
-# org.osgi.framework.bootdelegation=org.osgi.service.log
-
-# Extra System Packages
-org.osgi.framework.system.packages.extra=\
- org.apache.log4j;version=1.2, \
- org.jboss.logging, \
- org.jboss.osgi.deployment.common;version=1.0, \
- org.jboss.osgi.deployment.deployer;version=1.0, \
- org.jboss.osgi.deployment.interceptor;version=1.0, \
- org.jboss.osgi.spi;version=1.0, \
- org.jboss.osgi.spi.capability;version=1.0, \
- org.jboss.osgi.spi.framework;version=1.0, \
- org.jboss.osgi.spi.management;version=1.0, \
- org.jboss.osgi.spi.service;version=1.0, \
- org.jboss.osgi.spi.util;version=1.0, \
- org.jboss.osgi.testing, \
- 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.osgi.framework;version=1.4
-
-# Bundles that need to be installed with the Framework automatically
-org.jboss.osgi.spi.framework.autoInstall=\
- file://${test.archive.directory}/bundles/org.osgi.compendium.jar
-
-# Bundles that need to be started automatically
-org.jboss.osgi.spi.framework.autoStart=\
- file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-common.jar
-
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/reactor/blueprint/src/test/resources/jboss-osgi-framework.properties (from rev 97013, projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties)
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/src/test/resources/jboss-osgi-framework.properties (rev 0)
+++ projects/jboss-osgi/trunk/reactor/blueprint/src/test/resources/jboss-osgi-framework.properties 2009-11-26 14:35:19 UTC (rev 97025)
@@ -0,0 +1,43 @@
+#
+# Properties read by the org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
+#
+# $Id$
+#
+
+# Properties to configure the Framework
+org.osgi.framework.storage=${test.archive.directory}/../osgi-store
+org.osgi.framework.storage.clean=onFirstInit
+
+# Framework bootdelegation
+# org.osgi.framework.bootdelegation=org.osgi.service.log
+
+# Extra System Packages
+org.osgi.framework.system.packages.extra=\
+ org.apache.log4j;version=1.2, \
+ org.jboss.logging, \
+ org.jboss.osgi.deployment.common;version=1.0, \
+ org.jboss.osgi.deployment.deployer;version=1.0, \
+ org.jboss.osgi.deployment.interceptor;version=1.0, \
+ org.jboss.osgi.spi;version=1.0, \
+ org.jboss.osgi.spi.capability;version=1.0, \
+ org.jboss.osgi.spi.framework;version=1.0, \
+ org.jboss.osgi.spi.management;version=1.0, \
+ org.jboss.osgi.spi.service;version=1.0, \
+ org.jboss.osgi.spi.util;version=1.0, \
+ org.jboss.osgi.testing;version=1.0, \
+ org.jboss.virtual;version=2.1, \
+ org.jboss.virtual.plugins.registry;version=2.1, \
+ org.jboss.virtual.plugins.context.jar;version=2.1, \
+ org.jboss.virtual.plugins.vfs.helpers;version=2.1, \
+ org.jboss.virtual.protocol;version=2.1, \
+ org.osgi.framework;version=1.4
+
+# Bundles that need to be installed with the Framework automatically
+org.jboss.osgi.spi.framework.autoInstall=\
+ file://${test.archive.directory}/bundles/org.osgi.compendium.jar
+
+# Bundles that need to be started automatically
+org.jboss.osgi.spi.framework.autoStart=\
+ file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
+ file://${test.archive.directory}/bundles/jboss-osgi-common.jar
+
\ No newline at end of file
14 years, 7 months