summaryrefslogtreecommitdiffstats
path: root/java/sca/itest/osgi-tuscany
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/itest/osgi-tuscany')
-rw-r--r--java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/EquinoxTestRuntime.java1
-rw-r--r--java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/FelixTestRuntime.java38
-rw-r--r--java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/OSGiTestRuntime.java45
-rw-r--r--java/sca/itest/osgi-tuscany/test-bundles/src/main/resources/META-INF/SupplyChain.mf3
-rw-r--r--java/sca/itest/osgi-tuscany/test-bundles/src/main/resources/META-INF/SupplyChainClient.mf3
-rw-r--r--java/sca/itest/osgi-tuscany/tuscany-osgi-installer/pom.xml5
6 files changed, 57 insertions, 38 deletions
diff --git a/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/EquinoxTestRuntime.java b/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/EquinoxTestRuntime.java
index ab43b50273..2e3137239e 100644
--- a/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/EquinoxTestRuntime.java
+++ b/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/EquinoxTestRuntime.java
@@ -48,6 +48,7 @@ public class EquinoxTestRuntime extends OSGiTestRuntime {
Method startupMethod = eclipseStarterClass.getMethod("startup", String [].class, Runnable.class);
+ System.setProperty("org.osgi.framework.system.packages", getSystemPackages());
// Equinox version 3.2 upwards have a startup method which returns BundleContext
bundleContext = (BundleContext) startupMethod.invoke(null,
new String[] {/*"-clean", */"-console", "-configuration", "target/configuration"},
diff --git a/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/FelixTestRuntime.java b/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/FelixTestRuntime.java
index 9e4a9fb9d0..0dafffdb8c 100644
--- a/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/FelixTestRuntime.java
+++ b/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/FelixTestRuntime.java
@@ -92,42 +92,8 @@ public class FelixTestRuntime extends OSGiTestRuntime implements BundleActivator
props.put("felix.cache.profiledir", profileDir.getAbsolutePath());
props.put("felix.embedded.execution", "true");
- String systemPackages =
- "org.osgi.framework; version=1.3.0," +
- "org.osgi.service.packageadmin; version=1.2.0, " +
- "org.osgi.service.startlevel; version=1.0.0, " +
- "org.osgi.service.url; version=1.0.0, " +
- "org.osgi.util.tracker; version=1.3.2, " +
- "javax.xml, " +
- "javax.xml.datatype, " +
- "javax.xml.namespace, " +
- "javax.xml.parsers, " +
- "javax.xml.transform, " +
- "javax.xml.transform.dom, " +
- "javax.xml.transform.sax, " +
- "javax.xml.transform.stream, " +
- "javax.xml.validation, " +
- "javax.xml.xpath, " +
- "javax.sql," +
- "org.w3c.dom, " +
- "org.xml.sax, " +
- "org.xml.sax.ext, " +
- "org.xml.sax.helpers, " +
- "javax.security.auth, " +
- "javax.security.auth.login, " +
- "javax.security.auth.callback, " +
- "javax.naming, " +
- "javax.naming.spi, " +
- "javax.naming.directory, " +
- "javax.management, " +
- "sun.misc, " +
- "javax.net, " +
- "javax.crypto, " +
- "javax.rmi, " +
- "javax.transaction, " +
- "javax.transaction.xa, " +
-
- "org.apache.felix.main";
+ String systemPackages = getSystemPackages() +
+ ", org.apache.felix.main";
props.put("org.osgi.framework.system.packages", systemPackages);
diff --git a/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/OSGiTestRuntime.java b/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/OSGiTestRuntime.java
index 354c545f03..6362385a13 100644
--- a/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/OSGiTestRuntime.java
+++ b/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/OSGiTestRuntime.java
@@ -110,5 +110,50 @@ public abstract class OSGiTestRuntime {
instance = null;
}
}
+
+
+ /**
+ * @return the list of packages to be exported by the system bundle
+ */
+ protected String getSystemPackages() {
+ String systemPackages =
+ "org.osgi.framework; version=1.3.0," +
+ "org.osgi.service.packageadmin; version=1.2.0, " +
+ "org.osgi.service.startlevel; version=1.0.0, " +
+ "org.osgi.service.url; version=1.0.0, " +
+ "org.osgi.util.tracker; version=1.3.2, " +
+ "javax.xml, " +
+ "javax.xml.datatype, " +
+ "javax.xml.namespace, " +
+ "javax.xml.parsers, " +
+ "javax.xml.transform, " +
+ "javax.xml.transform.dom, " +
+ "javax.xml.transform.sax, " +
+ "javax.xml.transform.stream, " +
+ "javax.xml.validation, " +
+ "javax.xml.xpath, " +
+ "javax.sql," +
+ "org.w3c.dom, " +
+ "org.xml.sax, " +
+ "org.xml.sax.ext, " +
+ "org.xml.sax.helpers, " +
+ "javax.security.auth, " +
+ "javax.security.auth.login, " +
+ "javax.security.auth.callback, " +
+ "javax.naming, " +
+ "javax.naming.spi, " +
+ "javax.naming.directory, " +
+ "javax.management, " +
+ "javax.imageio, " +
+ "sun.misc, " +
+ "javax.net, " +
+ "javax.crypto, " +
+ "javax.rmi, " +
+ "javax.transaction, " +
+ "javax.transaction.xa";
+
+ return systemPackages;
+
+ }
}
diff --git a/java/sca/itest/osgi-tuscany/test-bundles/src/main/resources/META-INF/SupplyChain.mf b/java/sca/itest/osgi-tuscany/test-bundles/src/main/resources/META-INF/SupplyChain.mf
index 249d42858e..f71d822bbe 100644
--- a/java/sca/itest/osgi-tuscany/test-bundles/src/main/resources/META-INF/SupplyChain.mf
+++ b/java/sca/itest/osgi-tuscany/test-bundles/src/main/resources/META-INF/SupplyChain.mf
@@ -6,6 +6,7 @@ Bundle-Version: 1.0.0
Bundle-Localization: plugin
Import-Package: org.osgi.framework,
org.osoa.sca,
- org.osoa.sca.annotations
+ org.osoa.sca.annotations,
+ javax.xml.bind.annotation
Export-Package: supplychain.customer, supplychain
diff --git a/java/sca/itest/osgi-tuscany/test-bundles/src/main/resources/META-INF/SupplyChainClient.mf b/java/sca/itest/osgi-tuscany/test-bundles/src/main/resources/META-INF/SupplyChainClient.mf
index 9f13b1e9a6..13a3c9b82a 100644
--- a/java/sca/itest/osgi-tuscany/test-bundles/src/main/resources/META-INF/SupplyChainClient.mf
+++ b/java/sca/itest/osgi-tuscany/test-bundles/src/main/resources/META-INF/SupplyChainClient.mf
@@ -14,7 +14,8 @@ Import-Package: org.osgi.framework,
org.apache.tuscany.sca.core.assembly,
org.apache.tuscany.sca.assembly.builder,
org.osoa.sca,
- org.osoa.sca.annotations
+ org.osoa.sca.annotations,
+ javax.xml.bind.annotation
Export-Package: supplychain.client
Bundle-Activator: supplychain.client.SupplyChainClient
diff --git a/java/sca/itest/osgi-tuscany/tuscany-osgi-installer/pom.xml b/java/sca/itest/osgi-tuscany/tuscany-osgi-installer/pom.xml
index ff71b1981c..506801a64a 100644
--- a/java/sca/itest/osgi-tuscany/tuscany-osgi-installer/pom.xml
+++ b/java/sca/itest/osgi-tuscany/tuscany-osgi-installer/pom.xml
@@ -35,6 +35,11 @@
<dependencies>
<dependency>
<groupId>${pom.groupId}</groupId>
+ <artifactId>tuscany-monitor-logging</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${pom.groupId}</groupId>
<artifactId>tuscany-assembly</artifactId>
<version>${pom.version}</version>
</dependency>