Package org.jboss.forge.furnace.manager.request

Examples of org.jboss.forge.furnace.manager.request.InstallRequest.perform()


         AddonId id = AddonId.from(coordinate.getGroupId() + ":" + coordinate.getArtifactId(), coordinate.getVersion());
         RemoveRequest removeRequest = addonManager.remove(id);
         removeRequest.perform();
         Addons.waitUntilStopped(registry.getAddon(id));
         InstallRequest installRequest = addonManager.install(id);
         installRequest.perform();
         return Results.success("Addon " + coordinate.toString() + " was installed succesfully.");
      }
      catch (Throwable t)
      {
         return Results.fail("Addon " + coordinate.toString() + " could not be installed.", t);
View Full Code Here


         AddonId id = AddonId.fromCoordinates(addonId);
         InstallRequest install = addonManager.install(id, repository);
         if (!install.getActions().isEmpty())
         {
            getLog().info("" + install);
            install.perform();
         }
      }
   }

   private void deleteDirectory(File addonRepository) throws IOException
View Full Code Here

      AddonId addon = AddonId.from("org.jboss.forge.addon:addons", "2.0.0.Alpha6");
      InstallRequest install = addonManager.install(addon);
      List<?> actions = install.getActions();
      Assert.assertEquals(12, actions.size());
      Assert.assertThat((List<DeployRequest>) actions, everyItem(isA(DeployRequest.class)));
      install.perform();
   }

   // UI Depends on convert, facets, ui-spi, environment
   @SuppressWarnings("unchecked")
   @Test
View Full Code Here

      AddonId addonUI = AddonId.from("org.jboss.forge.addon:ui", "2.0.0.Alpha6");
      install = addonManager.install(addonUI);
      List<?> actions = install.getActions();
      Assert.assertEquals(5, install.getActions().size());
      Assert.assertThat((List<DeployRequest>) actions, everyItem(isA(DeployRequest.class)));
      install.perform();
      install = addonManager.install(addonUI);
      // No actions should be needed, since we have all the needed addons
      Assert.assertEquals(0, install.getActions().size());
   }
View Full Code Here

   @Test
   public void testAddonInstallNoDependencyWithAddonAlreadyInstalled() throws IOException
   {
      AddonId addon = AddonId.from("test:no_dep", "1.0.0.Final");
      InstallRequest install = addonManager.install(addon);
      install.perform();
      install = addonManager.install(addon);
      Assert.assertTrue(install.getActions().isEmpty());
   }

   @Test
View Full Code Here

   public void testAddonInstallSnapshot() throws IOException
   {
      AddonId addon = AddonId.from("test:no_dep", "1.1.2-SNAPSHOT");
      InstallRequest install = addonManager.install(addon);
      Assert.assertEquals(1, install.getActions().size());
      install.perform();
      install = addonManager.install(addon);
      List<? extends AddonActionRequest> actions = install.getActions();
      Assert.assertEquals(1, actions.size());
      Assert.assertThat(actions.get(0), instanceOf(UpdateRequest.class));
   }
View Full Code Here

      AddonId addon = AddonId.from("test:no_dep", "1.0.0.Final");
      InstallRequest install = addonManager.install(addon);
      List<? extends AddonActionRequest> actions = install.getActions();
      Assert.assertEquals(1, actions.size());
      Assert.assertThat(actions.get(0), instanceOf(DeployRequest.class));
      install.perform();
      Assert.assertEquals(1, furnace.getRepositories().get(0).listEnabled().size());
      Assert.assertEquals(1, furnace.getAddonRegistry().getAddons().size());
   }

   @Test(timeout = 20000)
View Full Code Here

      AddonId addon = AddonId.from("test:no_dep", "1.1.2-SNAPSHOT");
      InstallRequest install = addonManager.install(addon);
      List<? extends AddonActionRequest> actions = install.getActions();
      Assert.assertEquals(1, actions.size());
      Assert.assertThat(actions.get(0), instanceOf(DeployRequest.class));
      install.perform();

      Addons.waitUntilStarted(furnace.getAddonRegistry().getAddon(addon));

      Assert.assertEquals(1, furnace2.getRepositories().get(0).listEnabled().size());
      Assert.assertEquals(1, furnace.getRepositories().get(0).listEnabled().size());
View Full Code Here

         Addons.waitUntilStopped(registry.getAddon(id));
         progressMonitor.worked(1);

         progressMonitor.subTask("Installing addon (" + id + ")");
         InstallRequest installRequest = addonManager.install(id);
         installRequest.perform();
         progressMonitor.done();
         return Results.success("Addon " + id + " was installed successfully.");
      }
      catch (Throwable t)
      {
View Full Code Here

         AddonId id = AddonId.from(coordinate.getGroupId() + ":" + coordinate.getArtifactId(), coordinate.getVersion());
         RemoveRequest removeRequest = addonManager.remove(id);
         removeRequest.perform();
         Addons.waitUntilStopped(registry.getAddon(id));
         InstallRequest installRequest = addonManager.install(id);
         installRequest.perform();
         return Results.success("Addon " + coordinate.toString() + " was installed successfully.");
      }
      catch (Throwable t)
      {
         return Results.fail("Addon " + coordinate.toString() + " could not be installed.", t);
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.