Package org.gradle.api.java.archives.internal

Examples of org.gradle.api.java.archives.internal.DefaultManifest.attributes()


        otherManifest.mainAttributes(WrapUtil.toMap(Analyzer.BUNDLE_VENDOR, "mergeVendor"));
        osgiManifest.from(otherManifest);
        DefaultManifest defaultManifest = getDefaultManifestWithOsgiValues();
        DefaultManifest expectedManifest = new DefaultManifest(fileResolver).attributes(defaultManifest.getAttributes());
        for(Map.Entry<String, Attributes> ent : defaultManifest.getSections().entrySet()) {
            expectedManifest.attributes(ent.getValue(), ent.getKey());
        }
        expectedManifest.attributes(otherManifest.getAttributes());

        DefaultManifest manifest = osgiManifest.getEffectiveManifest();
        assertTrue(manifest.isEqualsTo(expectedManifest));
View Full Code Here


        DefaultManifest effectiveManifest = new DefaultManifest(null);
        try {
            setAnalyzerProperties(analyzer);
            Manifest osgiManifest = analyzer.calcManifest();
            for (Map.Entry<Object, Object> entry : osgiManifest.getMainAttributes().entrySet()) {
                effectiveManifest.attributes(WrapUtil.toMap(entry.getKey().toString(), (String) entry.getValue()));
            }
            effectiveManifest.attributes(this.getAttributes());
            for(Map.Entry<String, Attributes> ent : getSections().entrySet()) {
                effectiveManifest.attributes(ent.getValue(), ent.getKey());
            }
View Full Code Here

        DefaultManifest defaultManifest = getDefaultManifestWithOsgiValues();
        DefaultManifest expectedManifest = new DefaultManifest(fileResolver).attributes(defaultManifest.getAttributes());
        for(Map.Entry<String, Attributes> ent : defaultManifest.getSections().entrySet()) {
            expectedManifest.attributes(ent.getValue(), ent.getKey());
        }
        expectedManifest.attributes(otherManifest.getAttributes());

        DefaultManifest manifest = osgiManifest.getEffectiveManifest();
        assertTrue(manifest.isEqualsTo(expectedManifest));
    }
View Full Code Here

            setAnalyzerProperties(analyzer);
            Manifest osgiManifest = analyzer.calcManifest();
            for (Map.Entry<Object, Object> entry : osgiManifest.getMainAttributes().entrySet()) {
                effectiveManifest.attributes(WrapUtil.toMap(entry.getKey().toString(), (String) entry.getValue()));
            }
            effectiveManifest.attributes(this.getAttributes());
            for(Map.Entry<String, Attributes> ent : getSections().entrySet()) {
                effectiveManifest.attributes(ent.getValue(), ent.getKey());
            }
        } catch (Exception e) {
            throw UncheckedException.asUncheckedException(e);
View Full Code Here

            for (Map.Entry<Object, Object> entry : osgiManifest.getMainAttributes().entrySet()) {
                effectiveManifest.attributes(WrapUtil.toMap(entry.getKey().toString(), (String) entry.getValue()));
            }
            effectiveManifest.attributes(this.getAttributes());
            for(Map.Entry<String, Attributes> ent : getSections().entrySet()) {
                effectiveManifest.attributes(ent.getValue(), ent.getKey());
            }
        } catch (Exception e) {
            throw UncheckedException.asUncheckedException(e);
        }
        return getEffectiveManifestInternal(effectiveManifest);
View Full Code Here

        DefaultManifest manifest = osgiManifest.getEffectiveManifest();
        DefaultManifest defaultManifest = getDefaultManifestWithOsgiValues();
        DefaultManifest expectedManifest = new DefaultManifest(fileResolver).attributes(defaultManifest.getAttributes());
        for(Map.Entry<String, Attributes> ent : defaultManifest.getSections().entrySet()) {
            expectedManifest.attributes(ent.getValue(), ent.getKey());
        }

        assertThat(manifest.getAttributes(), Matchers.equalTo(expectedManifest.getAttributes()));
        assertThat(manifest.getSections(), Matchers.equalTo(expectedManifest.getSections()));
    }
View Full Code Here

        try {
            setAnalyzerProperties(analyzer);
            Manifest osgiManifest = analyzer.calcManifest();
            java.util.jar.Attributes attributes = osgiManifest.getMainAttributes();
            for (Map.Entry<Object, Object> entry : attributes.entrySet()) {
                effectiveManifest.attributes(WrapUtil.toMap(entry.getKey().toString(), (String) entry.getValue()));
            }
            effectiveManifest.attributes(this.getAttributes());
            for (Map.Entry<String, Attributes> ent : getSections().entrySet()) {
                effectiveManifest.attributes(ent.getValue(), ent.getKey());
            }
View Full Code Here

            Manifest osgiManifest = analyzer.calcManifest();
            java.util.jar.Attributes attributes = osgiManifest.getMainAttributes();
            for (Map.Entry<Object, Object> entry : attributes.entrySet()) {
                effectiveManifest.attributes(WrapUtil.toMap(entry.getKey().toString(), (String) entry.getValue()));
            }
            effectiveManifest.attributes(this.getAttributes());
            for (Map.Entry<String, Attributes> ent : getSections().entrySet()) {
                effectiveManifest.attributes(ent.getValue(), ent.getKey());
            }
            if (classesDir != null) {
                long mod = classesDir.lastModified();
View Full Code Here

            for (Map.Entry<Object, Object> entry : attributes.entrySet()) {
                effectiveManifest.attributes(WrapUtil.toMap(entry.getKey().toString(), (String) entry.getValue()));
            }
            effectiveManifest.attributes(this.getAttributes());
            for (Map.Entry<String, Attributes> ent : getSections().entrySet()) {
                effectiveManifest.attributes(ent.getValue(), ent.getKey());
            }
            if (classesDir != null) {
                long mod = classesDir.lastModified();
                if (mod > 0) {
                    effectiveManifest.getAttributes().put(Analyzer.BND_LASTMODIFIED, mod);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.