Examples of Furnace


Examples of org.jboss.forge.furnace.Furnace

   private final ProjectFactory projectFactory;

   public RegisterAsServiceCommand()
   {
      Furnace furnace = SimpleContainer.getFurnace(this.getClass().getClassLoader());
      this.inputFactory = furnace.getAddonRegistry().getServices(InputComponentFactory.class).get();
      this.projectFactory = furnace.getAddonRegistry().getServices(ProjectFactory.class).get();
   }
View Full Code Here

Examples of org.jboss.forge.furnace.Furnace

   private String[] addonIds;
  
   @Override
   public void execute() throws MojoExecutionException, MojoFailureException
   {
      Furnace forge = new FurnaceImpl();
      if (!addonRepository.exists())
      {
         addonRepository.mkdirs();
      }
      AddonRepository repository = forge.addRepository(AddonRepositoryMode.MUTABLE, addonRepository);
      Iterator<AddonDependencyResolver> it = ServiceLoader.load(AddonDependencyResolver.class).iterator();
      if (!it.hasNext())
      {
         throw new MojoExecutionException(
                  "No AddonDependencyResolver implementation found. Please add one in the <dependencies> section of the forge-maven-plugin.");
View Full Code Here

Examples of org.jboss.forge.furnace.Furnace

   private Settings settings;

   @Override
   public void execute() throws MojoExecutionException, MojoFailureException
   {
      Furnace forge = new FurnaceImpl();
      if (!addonRepository.exists())
      {
         addonRepository.mkdirs();
      }
      AddonRepository repository = forge.addRepository(AddonRepositoryMode.MUTABLE, addonRepository);
      MavenAddonDependencyResolver addonResolver = new MavenAddonDependencyResolver(this.classifier);
      addonResolver.setSettings(settings);
      AddonManager addonManager = new AddonManagerImpl(forge, addonResolver);

      for (String addonId : addonIds)
View Full Code Here

Examples of org.jboss.forge.furnace.Furnace

   private ProjectOperations projectOperations;

   public JavaEqualsHashcodeCommand()
   {
      Furnace furnace = SimpleContainer.getFurnace(this.getClass().getClassLoader());
      this.inputFactory = furnace.getAddonRegistry().getServices(InputComponentFactory.class).get();
      this.projectFactory = furnace.getAddonRegistry().getServices(ProjectFactory.class).get();
      this.projectOperations = furnace.getAddonRegistry().getServices(ProjectOperations.class).get();
   }
View Full Code Here

Examples of org.jboss.forge.furnace.Furnace

   private ProjectOperations projectOperations;

   public JavaEqualsHashcodeCommand()
   {
      Furnace furnace = SimpleContainer.getFurnace(this.getClass().getClassLoader());
      this.inputFactory = furnace.getAddonRegistry().getServices(InputComponentFactory.class).get();
      this.projectFactory = furnace.getAddonRegistry().getServices(ProjectFactory.class).get();
      this.projectOperations = furnace.getAddonRegistry().getServices(ProjectOperations.class).get();
   }
View Full Code Here

Examples of org.jboss.forge.furnace.Furnace

   private final ProjectFactory projectFactory;

   public RegisterAsServiceCommand()
   {
      Furnace furnace = SimpleContainer.getFurnace(this.getClass().getClassLoader());
      this.inputFactory = furnace.getAddonRegistry().getServices(InputComponentFactory.class).get();
      this.projectFactory = furnace.getAddonRegistry().getServices(ProjectFactory.class).get();
   }
View Full Code Here

Examples of org.jboss.forge.furnace.Furnace

   private AddonRegistry getAddonRegistry()
   {
      if (registry == null)
      {
         Furnace furnace = SimpleContainer.getFurnace(this.getClass().getClassLoader());
         this.registry = furnace.getAddonRegistry();
      }
      return registry;
   }
View Full Code Here

Examples of org.jboss.forge.furnace.Furnace

      try
      {
         Class<?> furnaceType = loader.loadClass("org.jboss.forge.furnace.impl.FurnaceImpl");
         final Object instance = furnaceType.newInstance();

         final Furnace furnace = (Furnace) ClassLoaderAdapterBuilder
                  .callingLoader(FurnaceFactory.class.getClassLoader())
                  .delegateLoader(loader).enhance(instance, Furnace.class);

         Callable<Set<ClassLoader>> whitelistCallback = new Callable<Set<ClassLoader>>()
         {
            volatile long lastRegistryVersion = -1;
            final Set<ClassLoader> result = Sets.getConcurrentSet();

            @Override
            public Set<ClassLoader> call() throws Exception
            {
               if (furnace.getStatus().isStarted())
               {
                  long registryVersion = furnace.getAddonRegistry().getVersion();
                  if (registryVersion != lastRegistryVersion)
                  {
                     result.clear();
                     lastRegistryVersion = registryVersion;
                     for (Addon addon : furnace.getAddonRegistry().getAddons())
                     {
                        ClassLoader classLoader = addon.getClassLoader();
                        if (classLoader != null)
                           result.add(classLoader);
                     }
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.