use of aQute.bnd.osgi.Domain in project bnd by bndtools.
the class ResourceBuilder method addFile.
public boolean addFile(File file, URI uri) throws Exception {
if (uri == null)
uri = file.toURI();
Domain manifest = Domain.domain(file);
String mime = BUNDLE_MIME_TYPE;
boolean hasIdentity = false;
if (manifest != null)
hasIdentity = addManifest(manifest);
else
mime = JAR_MIME_TYPE;
String sha256 = SHA256.digest(file).asHex();
addContentCapability(uri, sha256, file.length(), mime);
return hasIdentity;
}
Aggregations