Fix logger package addition in KarafAddonService (#3322)

Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
J-N-K
2023-01-18 23:04:44 +01:00
committed by GitHub
parent 8f9dafd1d6
commit dd756b8e25
@@ -144,6 +144,14 @@ public class KarafAddonService implements AddonService {
addon = addon.withLabel(feature.getDescription()).withLink(getDefaultDocumentationLink(type, name));
}
List<String> packages = feature.getBundles().stream().filter(bundle -> !bundle.isDependency()).map(bundle -> {
String location = bundle.getLocation();
location = location.substring(0, location.lastIndexOf("/")); // strip version
location = location.substring(location.lastIndexOf("/") + 1); // strip groupId and protocol
return location;
}).toList();
addon.withLoggerPackages(packages);
return addon.build();
}