Package org.apache.felix.utils.manifest

Examples of org.apache.felix.utils.manifest.Clause


        }
        for (Iterator<Bundle> it = bundles.iterator(); it.hasNext();) {
            Bundle b = it.next();
            List<Clause> importsList = imports.get(b);
            for (Iterator<Clause> itpi = importsList.iterator(); itpi.hasNext();) {
                Clause pi = itpi.next();
                boolean matching = false;
                for (Clause pe : exports) {
                    if (pi.getName().equals(pe.getName())) {
                        String evStr = pe.getAttribute(Constants.VERSION_ATTRIBUTE);
                        String ivStr = pi.getAttribute(Constants.VERSION_ATTRIBUTE);
                        Version exported = evStr != null ? Version.parseVersion(evStr) : Version.emptyVersion;
                        VersionRange imported = ivStr != null ? VersionRange.parseVersionRange(ivStr) : VersionRange.ANY_VERSION;
                        if (imported.contains(exported)) {
                            matching = true;
                            break;
View Full Code Here


    @Test
    public void testLoadOverrides() {
        Set<String> overrides = Overrides.loadOverrides(getClass().getResource("overrides.properties").toExternalForm());
        assertEquals(2, overrides.size());

        Clause karafAdminCommand = null;
        Clause karafAdminCore = null;
        for (Clause clause : Parser.parseClauses(overrides.toArray(new String[overrides.size()]))) {
            if (clause.getName().equals("mvn:org.apache.karaf.admin/org.apache.karaf.admin.command/2.3.0.redhat-61033X")) {
                karafAdminCommand = clause;
            }
            if (clause.getName().equals("mvn:org.apache.karaf.admin/org.apache.karaf.admin.core/2.3.0.redhat-61033X")) {
                karafAdminCore = clause;
            }
        }
        assertNotNull("Missing admin.command bundle override", karafAdminCommand);
        assertNotNull("Missing admin.core bundle override", karafAdminCore);
        assertNotNull("Missing range on admin.core override", karafAdminCore.getAttribute(Overrides.OVERRIDE_RANGE));
    }
View Full Code Here

TOP

Related Classes of org.apache.felix.utils.manifest.Clause

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.