Map<Object, Object> props = new HashMap<Object, Object>();
props.put("osgi.clean", "true");
props.put("osgi.instance.area", new File("target/workspace").toURI().toString());
props.put("osgi.install.area", new File("target/eclipse").toURI().toString());
props.put("osgi.configuration.area", new File("target/eclipse").toURI().toString());
framework = factory.newFramework(props);
framework.start();
return framework.getBundleContext();
}
public BundleContext start() {