use of org.apache.karaf.features.internal.model.Library in project karaf by apache.
the class AssemblyDeployCallback method installLibraries.
@Override
public void installLibraries(org.apache.karaf.features.Feature feature) throws IOException {
assertNotBlacklisted(feature);
Downloader downloader = manager.createDownloader();
List<String> libraries = new ArrayList<>();
for (Library library : ((Feature) feature).getLibraries()) {
String lib = library.getLocation() + ";type:=" + library.getType() + ";export:=" + library.isExport() + ";delegate:=" + library.isDelegate();
libraries.add(lib);
}
if (!libraries.isEmpty()) {
Path configPropertiesPath = etcDirectory.resolve("config.properties");
Properties configProperties = new Properties(configPropertiesPath.toFile());
builder.downloadLibraries(downloader, configProperties, libraries, " ");
}
try {
downloader.await();
} catch (Exception e) {
throw new IOException("Error downloading configuration files", e);
}
}
Aggregations