Search in sources :

Example 11 with CapabilityBuilder

use of aQute.bnd.osgi.resource.CapabilityBuilder in project bnd by bndtools.

the class BridgeRepository method addInformationCapability.

public static void addInformationCapability(ResourceBuilder rb, String name, String from, Throwable error) {
    try {
        CapabilityBuilder c = new CapabilityBuilder("bnd.info");
        c.addAttribute("name", name);
        if (from != null)
            c.addAttribute("from", from);
        if (error != null)
            c.addAttribute("error", error.toString());
        rb.addCapability(c);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : CapabilityBuilder(aQute.bnd.osgi.resource.CapabilityBuilder)

Aggregations

CapabilityBuilder (aQute.bnd.osgi.resource.CapabilityBuilder)11 Capability (org.osgi.resource.Capability)7 RequirementBuilder (aQute.bnd.osgi.resource.RequirementBuilder)5 Requirement (org.osgi.resource.Requirement)5 File (java.io.File)3 ResourcesRepository (aQute.bnd.osgi.repository.ResourcesRepository)2 ResourceBuilder (aQute.bnd.osgi.resource.ResourceBuilder)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Attrs (aQute.bnd.header.Attrs)1 Parameters (aQute.bnd.header.Parameters)1 DependencyResolver (aQute.bnd.maven.lib.resolve.DependencyResolver)1 RemotePostProcessor (aQute.bnd.maven.lib.resolve.RemotePostProcessor)1 Jar (aQute.bnd.osgi.Jar)1 Verifier (aQute.bnd.osgi.Verifier)1 XMLResourceGenerator (aQute.bnd.osgi.repository.XMLResourceGenerator)1 ContentCapability (aQute.bnd.osgi.resource.ResourceUtils.ContentCapability)1 IdentityCapability (aQute.bnd.osgi.resource.ResourceUtils.IdentityCapability)1 DownloadListenerPromise (aQute.bnd.util.repository.DownloadListenerPromise)1 Version (aQute.bnd.version.Version)1