+ if (version == null) {
+ // We use a properties file to retrieve ${karaf.version}, instead of .versionAsInProject()
+ // This avoids forcing all users to depend on Karaf in their POMs
+ Properties abstractConfigTestBaseProps = new Properties();
+ try (InputStream abstractConfigTestBaseInputStream = Thread.currentThread().getContextClassLoader()
+ .getResourceAsStream(PROPERTIES_FILENAME)) {
+ abstractConfigTestBaseProps.load(abstractConfigTestBaseInputStream);
+ } catch (final IOException e) {
+ LOG.error("Unable to load {} to determine the Karaf version", PROPERTIES_FILENAME, e);
+ }
+ version = abstractConfigTestBaseProps.getProperty(KARAF_DISTRO_VERSION_PROP);
+ }