Examples of FeaturesService


Examples of org.apache.karaf.features.FeaturesService

    public void execute() throws MojoExecutionException, MojoFailureException {
        KarArtifactInstaller installer = new KarArtifactInstaller();
        installer.setBasePath(workDirectory);
        installer.setLocalRepoPath(systemRepoDirectory);
        FeaturesService featuresService = new OfflineFeaturesService();
        installer.setFeaturesService(featuresService);
        installer.init();
        Collection<Artifact> dependencies = project.getDependencyArtifacts();
        StringBuilder buf = new StringBuilder();
        for (Artifact artifact: dependencies) {
View Full Code Here

Examples of org.apache.karaf.features.FeaturesService

        if (ref == null) {
            System.out.println("FeaturesService service is unavailable.");
            return null;
        }
        try {
            FeaturesService admin = (FeaturesService) getBundleContext().getService(ref);
            if (admin == null) {
                System.out.println("FeaturesService service is unavailable.");
                return null;
            }
View Full Code Here

Examples of org.apache.karaf.features.FeaturesService

    public void execute() throws MojoExecutionException, MojoFailureException {
        KarArtifactInstaller installer = new KarArtifactInstaller();
        installer.setBasePath(workDirectory);
        installer.setLocalRepoPath(localRepoDirectory);
        FeaturesService featuresService = new OfflineFeaturesService();
        installer.setFeaturesService(featuresService);
        installer.init();
        Collection<Artifact> dependencies = project.getDependencyArtifacts();
        StringBuilder buf = new StringBuilder();
        for (Artifact artifact: dependencies) {
View Full Code Here

Examples of org.apache.karaf.features.FeaturesService

        if (ref == null) {
            System.out.println("FeaturesService service is unavailable.");
            return null;
        }
        try {
            FeaturesService admin = (FeaturesService) getBundleContext().getService(ref);
            if (admin == null) {
                System.out.println("FeaturesService service is unavailable.");
                return null;
            }
View Full Code Here

Examples of org.apache.karaf.features.FeaturesService

  private static void installNexusEdition(final BundleContext ctx, final String editionName) throws Exception {
    if (editionName != null && editionName.length() > 0) {
      log.info("Installing {}", editionName);

      // edition might already be installed in the cache; if so then skip installation
      FeaturesService featuresService = ctx.getService(ctx.getServiceReference(FeaturesService.class));
      Feature editionFeature = featuresService.getFeature(editionName);

      if (!featuresService.isInstalled(editionFeature)) {
        EnumSet<Option> options = EnumSet.of(ContinueBatchOnFailure, NoCleanIfFailure, NoAutoRefreshBundles);
        featuresService.installFeature(editionFeature, options);
      }
    }
  }
View Full Code Here

Examples of org.apache.karaf.features.FeaturesService

      BundleContext context = bundle.getBundleContext();
      ServiceReference<FeaturesService> serviceReference = context.getServiceReference(FeaturesService.class);
      Assert.assertNotNull("Failed to obtain a reference to the FeaturesService.", serviceReference);

      FeaturesService service = context.getService(serviceReference);
      Assert.assertNotNull("Failed to obtain a FeaturesService instance.", service);

      Properties mavenProps = MavenUtils.getProperties();
      String version = mavenProps.getProperty(PROP_PROJECT_VERSION);
      Assert.assertNotNull("Failed to obtain the project version from maven.", version);
View Full Code Here

Examples of org.apache.karaf.features.FeaturesService

      BundleContext context = bundle.getBundleContext();
      ServiceReference<FeaturesService> serviceReference = context.getServiceReference(FeaturesService.class);
      Assert.assertNotNull("Failed to obtain a reference to the FeaturesService.", serviceReference);

      FeaturesService service = context.getService(serviceReference);
      Assert.assertNotNull("Failed to obtain a FeaturesService instance.", service);

      Properties mavenProps = MavenUtils.getProperties();
      String version = mavenProps.getProperty(PROP_PROJECT_VERSION);
      Assert.assertNotNull("Failed to obtain the project version from maven.", version);
View Full Code Here

Examples of org.apache.karaf.features.FeaturesService

        if (isBlobStoreLiveConfigured()) {
            createManagedBlobStoreService("aws-s3");
            BlobStore blobStoreService = getOsgiService(BlobStore.class);
            Thread.sleep(DEFAULT_TIMEOUT);

            FeaturesService featuresService = getOsgiService(FeaturesService.class);
            featuresService.installFeature("jclouds-url-handler");

            //Let's add a bundle to S3
            String groupId =  "org.jclouds.api";
            String artifactId =  "byon";
            String version =   System.getProperty("jclouds.version");
View Full Code Here

Examples of org.apache.karaf.features.FeaturesService

        if (isBlobStoreLiveConfigured()) {
            createManagedBlobStoreService("cloudfiles-us");
            BlobStore blobStoreService = getOsgiService(BlobStore.class);
            Thread.sleep(DEFAULT_TIMEOUT);

            FeaturesService featuresService = getOsgiService(FeaturesService.class);
            featuresService.installFeature("jclouds-url-handler");

            //Let's add a bundle to S3
            String groupId =  "org.jclouds.api";
            String artifactId =  "byon";
            String version =   System.getProperty("jclouds.version");
View Full Code Here

Examples of org.apache.karaf.features.FeaturesService

     * @param feature
     * @throws Exception
     */
    public void installAndCheckFeature(String feature) throws Exception {
        System.err.println(executeCommand("features:install " + feature));
        FeaturesService featuresService = getOsgiService(FeaturesService.class);
        System.err.println(executeCommand("osgi:list -t 0"));
        assertTrue("Expected " + feature + " feature to be installed.", featuresService.isInstalled(featuresService.getFeature(feature)));
    }
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.