Package org.ops4j.pax.exam.options

Examples of org.ops4j.pax.exam.options.MavenArtifactProvisionOption


    public static UrlReference getCamelKarafFeatureUrl() {
        return getCamelKarafFeatureUrl(null);
    }

    public static MavenArtifactProvisionOption getJUnitBundle() {
        MavenArtifactProvisionOption mavenOption = mavenBundle().groupId("org.apache.servicemix.bundles")
            .artifactId("org.apache.servicemix.bundles.junit");
        mavenOption.versionAsInProject().start(true).startLevel(10);
        return mavenOption;
    }
View Full Code Here


        return mavenOption;
    }
    public static UrlReference getCamelKarafFeatureUrl(String version) {

        String type = "xml/features";
        MavenArtifactProvisionOption mavenOption = mavenBundle().groupId("org.apache.camel.karaf").artifactId("apache-camel");
        if (version == null) {
            return mavenOption.versionAsInProject().type(type);
        } else {
            return mavenOption.version(version).type(type);
        }
    }
View Full Code Here

            karafVersion = "2.3.7";
        }
        return karafVersion;
    }
    public static MavenArtifactProvisionOption getJUnitBundle() {
        MavenArtifactProvisionOption mavenOption = mavenBundle().groupId("org.apache.servicemix.bundles")
            .artifactId("org.apache.servicemix.bundles.junit");
        mavenOption.versionAsInProject().start(true).startLevel(10);
        return mavenOption;
    }
View Full Code Here

    }

    public static UrlReference getCamelKarafFeatureUrl(String version) {

        String type = "xml/features";
        MavenArtifactProvisionOption mavenOption = mavenBundle().groupId("org.apache.camel.karaf").artifactId("apache-camel");
        if (version == null) {
            return mavenOption.versionAsInProject().type(type);
        } else {
            return mavenOption.version(version).type(type);
        }
    }
View Full Code Here

        applicationContext.setBundleContext(bc);
        applicationContext.refresh();
    }

    public static MavenArtifactProvisionOption getFeaturesUrl(String groupId, String artifactId, String version) {
        MavenArtifactProvisionOption mapo =  mavenBundle().groupId(groupId).artifactId(artifactId);
        mapo.type("xml");
        mapo.classifier("features");

        if (version == null) {
            mapo.versionAsInProject();
        } else {
            mapo.version(version);
        }

        LOG.info("Features URL : " + mapo.getURL());

        return mapo;
    }
View Full Code Here

        return mapo;
    }

    public static UrlReference getCamelKarafFeaturesUrl(String version) {
        MavenArtifactProvisionOption mapo = getFeaturesUrl("org.apache.camel.karaf", "apache-camel", version);
        return mapo;
    }
View Full Code Here

    @Configuration
    public static Option[] configure() {
        Option[] activeMQOptions = configure("activemq");

        MavenArtifactProvisionOption qpidClient = CoreOptions.mavenBundle("org.apache.qpid", "qpid-amqp-1-0-client").versionAsInProject();
        MavenArtifactProvisionOption qpidClientJms = CoreOptions.mavenBundle("org.apache.qpid", "qpid-amqp-1-0-client-jms").versionAsInProject();
        MavenArtifactProvisionOption qpidCommon = CoreOptions.mavenBundle("org.apache.qpid", "qpid-amqp-1-0-common").versionAsInProject();
        MavenArtifactProvisionOption geronimoJms = CoreOptions.mavenBundle("org.apache.geronimo.specs", "geronimo-jms_1.1_spec").versionAsInProject();
        MavenArtifactProvisionOption geronimoJta = CoreOptions.mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec","1.1.1");

        Option[] options = append(qpidClient, activeMQOptions);
        options = append(qpidClientJms, options);
        options = append(qpidCommon, options);
        options = append(geronimoJms, options);
View Full Code Here

    protected Bundle installJbiBundle(String groupId, String artifactId, String classifier, String type) throws BundleException {
        getOsgiService(org.osgi.service.url.URLStreamHandlerService.class, "(url.handler.protocol=jbi)", DEFAULT_TIMEOUT);
        getOsgiService(org.osgi.service.url.URLStreamHandlerService.class, "(url.handler.protocol=mvn)", DEFAULT_TIMEOUT);

        MavenArtifactProvisionOption mvnUrl = mavenBundle(groupId, artifactId, getArtifactVersion(groupId, artifactId), classifier, type);
        return bundleContext.installBundle("jbi:" + mvnUrl.getURL());

    }
View Full Code Here

            throw new RuntimeException(e);
        }
    }

    protected Bundle installBundle(String groupId, String artifactId) throws Exception {
        MavenArtifactProvisionOption mvnUrl = mavenBundle(groupId, artifactId);
        return bundleContext.installBundle(mvnUrl.getURL());
    }
View Full Code Here

            throw new RuntimeException(e);
        }
    }

    protected Bundle installBundle(String groupId, String artifactId) throws Exception {
        MavenArtifactProvisionOption mvnUrl = mavenBundle(groupId, artifactId);
        return bundleContext.installBundle(mvnUrl.getURL());
    }
View Full Code Here

TOP

Related Classes of org.ops4j.pax.exam.options.MavenArtifactProvisionOption

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.