Examples of InstallContext


Examples of io.fabric8.process.manager.InstallContext

        processConfig.setName(parameters.getName());
        ProcessConfig oldConfig = getProcessConfig(installation);

        String id = installation.getId();
        File installDir = installation.getInstallDir();
        InstallContext installContext = new InstallContext(parameters.getContainer(), installDir, true);

        if (processConfig != null && !oldConfig.equals(processConfig)) {
            installContext.addRestartReason("Environment Variables");
            if (LOG.isDebugEnabled()) {
                LOG.debug("Requires restart as config has changed: OLD: " + JsonHelper.toJson(oldConfig) + " and NEW: " + JsonHelper.toJson(processConfig));
            }
            // need to resolve the environment variables first
            resolveEnvironmentVariables(processConfig.getEnvironment());
            // make sure to update the process config
            JsonHelper.saveProcessConfig(processConfig, installDir);
            // need to update environment on the controller also, so it uses the updated environments when restarting
            installation.getController().getConfig().setEnvironment(processConfig.getEnvironment());
        }

        if (postInstall != null) {
            postInstall.install(installContext, processConfig, id, installDir);
        } else {
            // lets do the Jar thing...
            JarInstaller installer = new JarInstaller(parameters, processManager.getExecutor());
            installer.install(installContext, processConfig, id, installDir);
        }

        installContext.updateContainerChecksums();

        if (installContext.isRestartRequired()) {
            LOG.info("Restarting " + container.getId() + " due to profile changes: " + installContext.getRestartReasons());
            ProcessController controller = installation.getController();
            if (controller != null && container != null && container.isAlive()) {
                controller.restart();
            }
        }
View Full Code Here

Examples of io.fabric8.process.manager.InstallContext

        jarInstaller = new JarInstaller(installOptions, newSingleThreadExecutor());
    }

    @Test
    public void shouldInstallJarDependencies() throws Exception {
        InstallContext installContext = new InstallContext(null, installDir, false);
        jarInstaller.install(installContext, new ProcessConfig(), "1", installDir);
        assertTrue(new File(installDir, "lib/xstream-1.4.4.jar").exists());
    }
View Full Code Here

Examples of io.fabric8.process.manager.InstallContext

    }

    @Test
    public void shouldCopyMainJar() throws Exception {
        // When
        InstallContext installContext = new InstallContext(null, installDir, false);
        jarInstaller.install(installContext, new ProcessConfig(), "1", installDir);

        // Then
        Manifest manifest = new Jar(new File(installDir, "lib/main.jar")).getManifest();
        assertEquals("org.apache.camel.camel-xstream", manifest.getMainAttributes().getValue("Bundle-SymbolicName"));
View Full Code Here

Examples of io.fabric8.process.manager.InstallContext

        File installDir = createInstallDir(id);
        installDir.mkdirs();
        exportInstallDirEnvVar(options, installDir);

        ProcessConfig config = loadProcessConfig(options);
        InstallContext installContext = new InstallContext(options.getContainer(), installDir, false);
        installTask.install(installContext, config, id, installDir);
        JsonHelper.saveProcessConfig(config, installDir);
        installContext.updateContainerChecksums();

        Installation installation = createInstallation(options.getUrl(), id, installDir, config);
        installation.getController().install();
        return installation;
    }
View Full Code Here

Examples of org.formic.InstallContext

      Requirement[] requirements = new Requirement[1];
      requirements[0] = new EclipseRequirement();
      return requirements;
    }

    InstallContext context = Installer.getContext();
    boolean skipVim = ((Boolean)context.getValue("vim.skip")).booleanValue();

    Requirement[] requirements = new Requirement[skipVim ? 3 : 4];
    requirements[0] = new EclipseRequirement();
    requirements[1] = new WhichRequirement("make");
    requirements[2] = new WhichRequirement("gcc");
View Full Code Here

Examples of org.formic.InstallContext

    createInclude().setName("**/org.eclim.core_*/**/*");
    createInclude().setName("**/org.eclim.vimplugin/**/*");
    createInclude().setName("**/org.eclim.vimplugin_*/**/*");

    // feature based includes
    InstallContext context = Installer.getContext();
    String[] keys = context.getKeysByPrefix("featureList");
    for (int ii = 0; ii < keys.length; ii++){
      String key = keys[ii];
      Boolean value = Boolean.valueOf(context.getValue(key).toString());
      if(value.booleanValue()){
        createFeatureIncludes(key);

        // handle per version features by removing the version suffix.
        Matcher matcher = VERSIONED.matcher(key);
View Full Code Here

Examples of org.formic.InstallContext

   */
  public boolean proceed()
  {
    boolean proceed = super.proceed();
    if (proceed){
      InstallContext context = Installer.getContext();
      context.setValue("vim.skip", Boolean.valueOf(skipCheckBox.isSelected()));
      String vimfiles = (String)context.getValue("vim.files");

      if (vimfiles != null){
        vimfiles = vimfiles.replace('\\', '/');
        context.setValue("vim.files", vimfiles);

        // Check if the user has the eclim vim files already installed in
        // another directory in their vim's runtime path.

        // on windows, since case is insensitive, lower the path.
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.