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
對我的工作區中的開發版本的捆綁包運行測試。