Package org.apache.karaf.tooling.features.model

Examples of org.apache.karaf.tooling.features.model.BundleRef


        Feature merged = new Feature("merged");
        Map<String, BundleRef> bundleVersions = new HashMap<String, BundleRef>();
        for (Feature feature : featuresSet) {
            for (BundleRef bundle : feature.getBundles()) {
                bundle.readManifest();
                BundleRef existingBundle = bundleVersions.get(bundle.getBundleSymbolicName());
                if (existingBundle != null) {
                    Version existingVersion = new Version(existingBundle.getBundleVersion());
                    Version newVersion = new Version(bundle.getBundleVersion());
                    if (newVersion.compareTo(existingVersion) > 0) {
                        bundleVersions.put(bundle.getBundleSymbolicName(), bundle);
                    }
                } else {
View Full Code Here


    @Test
    public void testWriteFeature() throws XMLStreamException, UnsupportedEncodingException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        FeatureMetaDataExporter featureMetaDataExporter = new FeatureMetaDataExporter(baos);
       
        BundleRef bundle = new BundleRef("mvn:org.apache.example/example/1.0.0", 10);
        Artifact bundleArtifact = new DefaultArtifact("org.apache.example", "example", "1.0.0",
                                                      null, "jar", null,
                                                      new DefaultArtifactHandler());
        bundle.setArtifact(bundleArtifact);

        ArtifactRef configFile = new ArtifactRef("mvn:org.apache.example/example/1.0.0/cfg");
        Artifact configFileArtifact = new DefaultArtifact("org.apache.example", "example", "1.0.0",
                                                          null, "xml", "exampleconfig",
                                                          new DefaultArtifactHandler());
View Full Code Here

        Feature merged = new Feature("merged");
        Map<String, BundleRef> bundleVersions = new HashMap<String, BundleRef>();
        for (Feature feature : featuresSet) {
            for (BundleRef bundle : feature.getBundles()) {
                bundle.readManifest();
                BundleRef existingBundle = bundleVersions.get(bundle.getBundleSymbolicName());
                if (existingBundle != null) {
                    Version existingVersion = new Version(existingBundle.getBundleVersion());
                    Version newVersion = new Version(bundle.getBundleVersion());
                    if (newVersion.compareTo(existingVersion) > 0) {
                        bundleVersions.put(bundle.getBundleSymbolicName(), bundle);
                    }
                } else {
View Full Code Here

TOP

Related Classes of org.apache.karaf.tooling.features.model.BundleRef

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.