Package org.apache.ivy.osgi.repo

Examples of org.apache.ivy.osgi.repo.ModuleDescriptorWrapper


        } finally {
            in.close();
        }
        assertEquals(2, CollectionUtils.toList(repo.getModules()).size());

        ModuleDescriptorWrapper bundle1 = repo.findModule(BUNDLE_1, BUNDLE_VERSION);
        assertNotNull(bundle1);
        Artifact[] artifacts = bundle1.getModuleDescriptor().getAllArtifacts();
        assertEquals(2, artifacts.length);
        if (artifacts[0].getType().equals("jar")) {
            assertEquals("source", artifacts[1].getType());
        } else {
            assertEquals("jar", artifacts[1].getType());
            assertEquals("source", artifacts[0].getType());
        }

        ModuleDescriptorWrapper bundle2 = repo.findModule(BUNDLE_2, BUNDLE_VERSION);
        assertNotNull(bundle2);
        assertEquals(1, bundle2.getModuleDescriptor().getAllArtifacts().length);
    }
View Full Code Here


    public void addArtifactUrl(String classifier, String id, Version version, URI uri, String format) {
        if (!classifier.equals("osgi.bundle")) {
            // we only support OSGi bundle, no Eclipse feature or anything else
            return;
        }
        ModuleDescriptorWrapper module = findModule(id, version);
        if (module != null) {
            addArtifact(module.getBundleInfo(), new BundleArtifact(false, uri, format));
            return;
        }

        // not found in the regular bundle. Let's look up in the source ones
        Map<Version, BundleInfo> byVersion = sourceBundles.get(id);
View Full Code Here

TOP

Related Classes of org.apache.ivy.osgi.repo.ModuleDescriptorWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.