Fix logger package addition in KarafAddonService (#3322)

Signed-off-by: Jan N. Klug <github@klug.nrw>
pull/3326/head
J-N-K 2023-01-18 23:04:44 +01:00 committed by GitHub
parent 8f9dafd1d6
commit dd756b8e25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -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();
}