I am attempting to integration test a Karaf feature with Pax Exam but I cant work out how to install a feature in my config()
method.
Pax Exam is version 2.6.0 and Apache Karaf 2.3.2.
This is my config method:
@Configuration
public Option[] config() {
return new Option[]{karafDistributionConfiguration().frameworkUrl(
maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("zip").versionAsInProject())
.karafVersion("2.3.2").name("Apache Karaf").unpackDirectory(new File("target")),
keepRuntimeFolder()};
}
Individual bundles can be installed with mavenBundle("group", "artifact", "version")
but there seems to be no mechanism to install a Karaf feature with Pax Exam.
I am able to install features pragmatically in a setup method annotated with Junit @Before
but it too late to get my services injected with @Inject.
Is it possible to install Apache Karaf Features in the config()
method of a Pax Exam Test?