import org.argeo.slc.SlcException;
import org.argeo.slc.build.Distribution;
import org.argeo.slc.build.License;
-import org.osgi.framework.Version;
import org.eclipse.aether.artifact.Artifact;
import org.eclipse.aether.artifact.DefaultArtifact;
+import org.osgi.framework.Version;
import org.springframework.beans.factory.BeanNameAware;
-import aQute.lib.osgi.Builder;
-import aQute.lib.osgi.Constants;
-import aQute.lib.osgi.Jar;
+import aQute.bnd.osgi.Builder;
+import aQute.bnd.osgi.Constants;
+import aQute.bnd.osgi.Jar;
/** Utilities around the BND library, which manipulates OSGi metadata. */
public class BndWrapper implements Constants, CategorizedNameVersion,
try {
byte[] jarBytes = IOUtils.toByteArray(in);
- jar = new Jar(null, new ByteArrayInputStream(jarBytes));
+ jar = new Jar(name, new ByteArrayInputStream(jarBytes));
Manifest sourceManifest = jar.getManifest();
Version versionToUse;
} catch (Exception e) {
throw new SlcException("Cannot wrap jar", e);
} finally {
- b.close();
- if (jar != null)
- jar.close();
+ try {
+ b.close();
+ if (jar != null)
+ jar.close();
+ } catch (Exception e) {
+ // silent
+ }
}
}