Resolution: Not A Problem
Affects Version/s: 2.3.2, 3.0.0.RC1
Fix Version/s: None
Following the manual at http://karaf.apache.org/manual/latest-2.3.x/developers-guide/writing-tests.html#KarafDistributionConfigurationOption I tried to write integration tests based on a custom Karaf distribution.
I used the following to configure the container:
When running the tests I get an "No karaf base dir found in extracted distribution." error. When looking into the "target\exam\<random>\" folder (= UNPACK_DIRECTORY) there is really a mess:
What I expected was the default Karaf distribution layout:
Digging into the problem I found out that the eg. the apache-karaf-2.3.2.zip looks like:
Whereas the custom distribution I'm using looks like:
Note the different "base" directory in the two packages - "apache-karaf-2.3.2" in case of the Karaf 2.3.2 assembly.
It seems that the container assumes that every zip/tar.gz file given has this "base" directory structure and extracts only the contents of subfolders to the unpack directory.
I think a check for this "base" directory should be integrated in the container and either extract only the contents in this "base" directory or extract the whole file otherwise - the base directory seems to have the same name as the artifact name?!
If you want to try it out you can get the distribution from http://dev.arcsmed.at/nexus/content/repositories/homer.core-snapshots/at/ac/ait/hbs/homer/at.ac.ait.hbs.homer.core.distribution.assemblies.stable/1.2.0-SNAPSHOT/