in src/main/java/org/apache/sling/maven/jspc/FeatureSupport.java [127:150]
private static List<Bundle> install(final Framework framework, final Feature feature, final ArtifactProvider provider) throws BundleException {
final BundleContext bc = framework.getBundleContext();
int defaultStartLevel = getProperty(bc, "felix.startlevel.bundle", 1);
Map<Integer, List<Artifact>> bundlesByStartOrder = feature.getBundles().getBundlesByStartOrder();
List<Bundle> bundles = new ArrayList<>();
for(final Integer startLevel : sortStartLevels(bundlesByStartOrder.keySet(), defaultStartLevel)) {
for(final Artifact bundleArtifact : bundlesByStartOrder.get(startLevel)) {
URL url = provider.provide(bundleArtifact.getId());
// use reference protocol if possible. This avoids copying the binary to the cache directory
// of the framework
String location = "";
if (url.getProtocol().equals("file")) {
location = "reference:";
}
location = location + url.toString();
final Bundle bundle = bc.installBundle(location, null);
if (!isSystemBundleFragment(bundle) && getFragmentHostHeader(bundle) == null) {
bundles.add(bundle);
}
}
}
return bundles;
}