Package org.jboss.forge.furnace.addons

Examples of org.jboss.forge.furnace.addons.AddonId


      Project project = getSelectedProject(builder.getUIContext());
      if (project != null)
      {
         MetadataFacet facet = project.getFacet(MetadataFacet.class);
         String name = facet.getTopLevelPackage() + ":" + facet.getProjectName();
         AddonId selectedAddonId = AddonId.from(name, facet.getProjectVersion());
         if (choices.contains(selectedAddonId))
         {
            addons.setDefaultValue(Collections.singleton(selectedAddonId));
         }
      }
View Full Code Here


      Iterable<AddonId> value = addons.getValue();
      Iterator<AddonId> iterator = value.iterator();
      StringBuilder builder = new StringBuilder();
      while (iterator.hasNext())
      {
         AddonId addonId = iterator.next();
         builder.append(addonId.toCoordinates());

         manager.disable(addonId).perform();
         manager.remove(addonId).perform();

         if (iterator.hasNext())
View Full Code Here

         return Results.fail("Unable to execute project build", e);
      }

      try
      {
         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();
View Full Code Here

   private AddonActionRequest createRequest(final AddonInfo requestedAddonInfo, final AddonInfo addonInfo,
            final MutableAddonRepository repository,
            final Map<AddonId, AddonRepository> installedAddons)
   {
      final AddonActionRequest request;
      AddonId addon = addonInfo.getAddon();
      if (installedAddons.containsKey(addon))
      {
         // Already contains the installed addon. Update ONLY if the version is SNAPSHOT and if it is the requested
         // addon
         if (Versions.isSnapshot(addonInfo.getAddon().getVersion()) && addonInfo.equals(requestedAddonInfo))
         {
            AddonRepository addonRepository = installedAddons.get(addon);
            if (repository.equals(addonRepository))
            {
               request = createUpdateRequest(addonInfo, addonInfo, repository, furnace);
            }
            else
            {
               request = createDeployRequest(addonInfo, repository, furnace);
            }
         }
         else
         {
            request = null;
         }
      }
      else
      {
         Entry<AddonId, AddonRepository> differentVersionEntry = null;
         for (Entry<AddonId, AddonRepository> addonEntry : installedAddons.entrySet())
         {
            AddonId addonId = addonEntry.getKey();
            if (addonId.getName().equals(addon.getName()))
            {
               differentVersionEntry = addonEntry;
               break;
            }
         }
View Full Code Here

   }

   @Override
   public void execute()
   {
      AddonId id = getRequestedAddonInfo().getAddon();
      repository.disable(id);
   }
View Full Code Here

      furnace.getLockManager().performLocked(LockMode.WRITE, new Callable<Object>()
      {
         @Override
         public Object call() throws Exception
         {
            AddonId id = getRequestedAddonInfo().getAddon();
            repository.disable(id);
            repository.undeploy(id);
            return null;
         }
      });
View Full Code Here

   }

   @Override
   public void execute()
   {
      AddonId id = getRequestedAddonInfo().getAddon();
      repository.enable(id);
   }
View Full Code Here

      });
   }

   protected void deploy(MutableAddonRepository repository)
   {
      AddonId addon = addonInfo.getAddon();
      Set<File> resourceJars = addonInfo.getResources();

      if (resourceJars.isEmpty())
      {
         log.fine("No resource JARs found for " + addon);
View Full Code Here

      addonResolver.setResolveAddonAPIVersions(!skipAddonAPIVersionResolution);
      AddonManager addonManager = new AddonManagerImpl(forge, addonResolver);

      for (String addonId : addonIds)
      {
         AddonId id = AddonId.fromCoordinates(addonId);
         InstallRequest install = addonManager.install(id, repository);
         if (!install.getActions().isEmpty())
         {
            getLog().info("" + install);
            install.perform();
View Full Code Here

      {
         MavenAddonDependencyResolver addonResolver = new MavenAddonDependencyResolver(classifier);
         addonResolver.setSettings(settings);
         if (addonIds == null || addonIds.length == 0)
         {
            AddonId id = AddonId.from(mavenProject.getGroupId() + ":" + mavenProject.getArtifactId(),
                     mavenProject.getVersion());
            String fileName = outputFileName == null ? id.getName().substring(id.getName().indexOf(':') + 1) + "-"
                     + id.getVersion() + ".dot" : outputFileName;
            File file = generateDOTFile(addonResolver, id, fileName);
            if (attach && file.isFile())
            {
               projectHelper.attachArtifact(mavenProject, "dot", file);
            }
         }
         else
         {
            for (String addonId : addonIds)
            {
               AddonId id = AddonId.fromCoordinates(addonId);
               String fileName = id.getName().substring(id.getName().indexOf(':') + 1) + "-"
                        + id.getVersion() + ".dot";
               generateDOTFile(addonResolver, id, fileName);
            }
         }
      }
      catch (Exception e)
View Full Code Here

TOP

Related Classes of org.jboss.forge.furnace.addons.AddonId

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.