Package aQute.bnd.osgi

Examples of aQute.bnd.osgi.Macro


                    }
                    String version = parts[1];
                    if (!version.startsWith("[") && !version.startsWith("(")) {
                        Processor processor = new Processor();
                        processor.setProperty("@", VersionTable.getVersion(version).toString());
                        Macro macro = new Macro(processor);
                        version = macro.process("${range;[==,=+)}");
                    }
                    VersionRange range = new VersionRange(version);
                    Map<String, String> hdrs = ranges.get(range);
                    if (hdrs == null) {
                        hdrs = new HashMap<String, String>();
View Full Code Here


    protected static void addDependency(FeatureResource resource, String name, String version, String featureRange) {
        if (!version.startsWith("[") && !version.startsWith("(")) {
            Processor processor = new Processor();
            processor.setProperty("@", VersionTable.getVersion(version).toString());
            Macro macro = new Macro(processor);
            version = macro.process(featureRange);
        }
        Map<String, String> dirs;
        Map<String, Object> attrs;
        dirs = new HashMap<String, String>();
        attrs = new HashMap<String, Object>();
View Full Code Here

    public void registerMatchingFeatures(String name, String version) throws IOException {
        if (!version.startsWith("[") && !version.startsWith("(")) {
            Processor processor = new Processor();
            processor.setProperty("@", VersionTable.getVersion(version).toString());
            Macro macro = new Macro(processor);
            version = macro.process(featureRange);
        }
        registerMatchingFeatures(name, new VersionRange(version));
    }
View Full Code Here

    @Test
    public void testRange() throws Exception {
        Processor processor = new Processor();
        processor.setProperty("@", "1.2.3.redhat-61-SNAPSHOT");
        Macro macro = new Macro(processor);

        assertEquals("[1.2,1.3)", macro.process("${range;[==,=+)}"));
        assertEquals("[1.2.3.redhat-61-SNAPSHOT,2)", macro.process("${range;[====,+)}"));
    }
View Full Code Here

TOP

Related Classes of aQute.bnd.osgi.Macro

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.