Search in sources :

Example 11 with BundleArtifact

use of org.apache.ivy.osgi.core.BundleArtifact in project ant-ivy by apache.

the class BundleRepoDescriptor method populate.

public void populate(Iterator<ManifestAndLocation> it) {
    while (it.hasNext()) {
        ManifestAndLocation manifestAndLocation = it.next();
        try {
            BundleInfo bundleInfo = ManifestParser.parseManifest(manifestAndLocation.getManifest());
            bundleInfo.addArtifact(new BundleArtifact(false, manifestAndLocation.getUri(), null));
            addBundle(bundleInfo);
        } catch (ParseException e) {
            Message.error("Rejected " + manifestAndLocation.getUri() + ": " + e.getMessage());
        }
    }
}
Also used : BundleInfo(org.apache.ivy.osgi.core.BundleInfo) BundleArtifact(org.apache.ivy.osgi.core.BundleArtifact) ParseException(java.text.ParseException)

Aggregations

BundleArtifact (org.apache.ivy.osgi.core.BundleArtifact)11 BundleInfo (org.apache.ivy.osgi.core.BundleInfo)9 File (java.io.File)3 FileInputStream (java.io.FileInputStream)3 URI (java.net.URI)3 ModuleDescriptorWrapper (org.apache.ivy.osgi.repo.ModuleDescriptorWrapper)3 ParseException (java.text.ParseException)2 JarInputStream (java.util.jar.JarInputStream)2 Manifest (java.util.jar.Manifest)2 Artifact (org.apache.ivy.core.module.descriptor.Artifact)2 DefaultModuleDescriptor (org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor)2 ResolveReport (org.apache.ivy.core.report.ResolveReport)2 ResolveOptions (org.apache.ivy.core.resolve.ResolveOptions)2 BundleRequirement (org.apache.ivy.osgi.core.BundleRequirement)2 Version (org.apache.ivy.osgi.util.Version)2 AttributesImpl (org.xml.sax.helpers.AttributesImpl)2 FileOutputStream (java.io.FileOutputStream)1 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 ModuleRevisionId (org.apache.ivy.core.module.id.ModuleRevisionId)1