knopflerfish is running now. needed to set org.knopflerfish.framework.bundlestorage.file.unpack = true
diff --git a/integration-tests/tests/pom.xml b/integration-tests/tests/pom.xml
index f4a67cd..5b2e488 100644
--- a/integration-tests/tests/pom.xml
+++ b/integration-tests/tests/pom.xml
@@ -21,8 +21,8 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.configadmin</artifactId>
- <version>1.2.8</version>
- <scope>provided</scope>
+ <version>1.4.0</version>
+ <scope>runtime</scope>
</dependency>
<!-- metatype service -->
@@ -76,105 +76,105 @@
<groupId>org.eclipse.gemini.blueprint.iandt</groupId>
<artifactId>service.listener</artifactId>
<version>${project.parent.version}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.gemini.blueprint.iandt</groupId>
<artifactId>lifecycle</artifactId>
<version>${project.parent.version}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.gemini.blueprint.iandt</groupId>
<artifactId>recursive</artifactId>
<version>${project.parent.version}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.gemini.blueprint.iandt</groupId>
<artifactId>reference.proxy</artifactId>
<version>${project.parent.version}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.gemini.blueprint.iandt</groupId>
<artifactId>simple.service</artifactId>
<version>${project.parent.version}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.gemini.blueprint.iandt</groupId>
<artifactId>simple.service2</artifactId>
<version>${project.parent.version}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.gemini.blueprint.iandt</groupId>
<artifactId>cardinality0to1</artifactId>
<version>${project.parent.version}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.gemini.blueprint.iandt</groupId>
<artifactId>scoped.bundle.a</artifactId>
<version>${project.parent.version}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.gemini.blueprint.iandt</groupId>
<artifactId>scoped.bundle.b</artifactId>
<version>${project.parent.version}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.gemini.blueprint.iandt</groupId>
<artifactId>scoped.bundle.common</artifactId>
<version>${project.parent.version}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.gemini.blueprint.iandt</groupId>
<artifactId>configuration</artifactId>
<version>${project.parent.version}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.gemini.blueprint.iandt</groupId>
<artifactId>dependencies</artifactId>
<version>${project.parent.version}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.gemini.blueprint.iandt</groupId>
<artifactId>tccl.intf</artifactId>
<version>${project.parent.version}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.gemini.blueprint.iandt</groupId>
<artifactId>proxy.listener</artifactId>
<version>${project.parent.version}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.gemini.blueprint.iandt</groupId>
<artifactId>component.scan.bundle</artifactId>
<version>${project.parent.version}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
</dependencies>
@@ -191,12 +191,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <!--
- <includes>
- <include>**/ScopingTest.java</include>
- </includes>
- -->
- <forkMode>pertest</forkMode>
+ <forkCount>1</forkCount>
+ <reuseForks>false</reuseForks>
<forkedProcessTimeoutInSeconds>2700</forkedProcessTimeoutInSeconds>
<systemProperties>
<property>
diff --git a/pom.xml b/pom.xml
index 3e0ba29..1f2b3a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -50,7 +50,7 @@
<equinox.ver>3.7.2.v20120110-1415</equinox.ver>
<!--<equinox.ver>3.6.2.R36x_v20110210</equinox.ver>-->
<!-- Knopflerfish 4.0.1 -->
- <kf.ver>6.0.4</kf.ver>
+ <kf.ver>6.0.2</kf.ver>
<!-- Felix 4.x supports OSGi R4.3 -->
<felix.ver>4.0.3</felix.ver>
<!--<kf.ver>5.3.3</kf.ver>-->
@@ -404,6 +404,7 @@
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
+ <scope>provided</scope>
</dependency>
</dependencies>
@@ -907,6 +908,11 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
<properties>
<osgi.test.platform>org.eclipse.gemini.blueprint.test.platform.FelixPlatform</osgi.test.platform>
diff --git a/test-support/src/main/java/org/eclipse/gemini/blueprint/test/platform/KnopflerfishPlatform.java b/test-support/src/main/java/org/eclipse/gemini/blueprint/test/platform/KnopflerfishPlatform.java
index 380a7fb..f732767 100644
--- a/test-support/src/main/java/org/eclipse/gemini/blueprint/test/platform/KnopflerfishPlatform.java
+++ b/test-support/src/main/java/org/eclipse/gemini/blueprint/test/platform/KnopflerfishPlatform.java
@@ -17,6 +17,7 @@
import java.io.File;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
+import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
@@ -27,6 +28,7 @@
import org.osgi.framework.BundleContext;
import org.springframework.beans.BeanUtils;
import org.springframework.util.ClassUtils;
+import org.springframework.util.CollectionUtils;
import org.springframework.util.ReflectionUtils;
/**
@@ -69,7 +71,7 @@
public BundleContext start() {
framework = BeanUtils.instantiateClass(CONSTRUCTOR, monitor);
- ReflectionUtils.invokeMethod(LAUNCH, framework, Integer.valueOf(0));
+ ReflectionUtils.invokeMethod(LAUNCH, framework, 0);
return (BundleContext) ReflectionUtils.invokeMethod(GET_BUNDLE_CONTEXT, framework);
}
@@ -83,11 +85,11 @@
private static class KF3Platform implements Platform {
private Bundle framework;
- private final Map properties;
+ private final Map<String, String> properties;
private final Log log;
private FrameworkTemplate fwkTemplate;
- KF3Platform(Map properties, Log log) {
+ KF3Platform(Map<String, String> properties, Log log) {
this.properties = properties;
this.log = log;
}
@@ -110,7 +112,6 @@
}
private static final String KF_2X_BOOT_CLASS = "org.knopflerfish.framework.Framework";
- private static final String KF_3X_BOOT_CLASS = "org.knopflerfish.framework.FrameworkContext";
private static final boolean KF_2X =
ClassUtils.isPresent(KF_2X_BOOT_CLASS, KnopflerfishPlatform.class.getClassLoader());
@@ -136,7 +137,7 @@
props.setProperty("org.osgi.framework.dir", kfStorageDir.getAbsolutePath());
props.setProperty("org.knopflerfish.framework.bundlestorage", "file");
props.setProperty("org.knopflerfish.framework.bundlestorage.file.reference", "true");
- props.setProperty("org.knopflerfish.framework.bundlestorage.file.unpack", "false");
+ props.setProperty("org.knopflerfish.framework.bundlestorage.file.unpack", "true");
props.setProperty("org.knopflerfish.startlevel.use", "true");
props.setProperty("org.knopflerfish.osgi.setcontextclassloader", "true");
// embedded mode
@@ -163,7 +164,9 @@
if (framework == null) {
// copy configuration properties to sys properties
System.getProperties().putAll(getConfigurationProperties());
- framework = (KF_2X ? new KF2Platform(this) : new KF3Platform(getPlatformProperties(), log));
+ Map<String, String> props = new HashMap<String, String>();
+ CollectionUtils.mergePropertiesIntoMap(getPlatformProperties(), props);
+ framework = (KF_2X ? new KF2Platform(this) : new KF3Platform(props, log));
context = framework.start();
}
}