0
这适用于Pax考试本机容器(Pax考试2.3.1),但不适用于Pax考试Karaf容器(0.5.2)对我来说:Pax考试Karaf:mavenBundle配置选项工程,与文件绑定:URL不是
@Configuration
public Option[] config() {
return options(
// karafDistributionConfiguration()
// .frameworkUrl(
// maven().groupId("org.apache.karaf")
// .artifactId("apache-karaf").type("zip"))
// .karafVersion("2.2.6").name("Apache Karaf"),
provision(bundle("reference:file:/path/to.jar")));
}
的测试检查捆绑安装:
@Inject
BundleContext bundleContext = null;
@Test
public void sameRepositoryProvidesFBServiceAndUserService() {
for (Bundle b : bundleContext.getBundles()) {
if (b.getSymbolicName().equals(myBundleName)) {
return;
}
}
fail("Bundle " + myBundleName + " not found");
}
如果我取消karafDistributionConfiguration
与mavenBundle(groupId, artifactId)
取代bundle(url)
,测试下大同考试Karaf再次通过。有可能吗?我需要使用bundle
对我的工作区中的开发版本的捆绑包运行测试。