Package org.eclim.installer.step.command

Examples of org.eclim.installer.step.command.InstallCommand


                }

                taskProgress.setValue(0);
                taskProgress.setIndeterminate(true);

                Command command = new InstallCommand(
                    EclipsePluginsStep.this,
                    dependency.getSite(),
                    dependency.getId());
                try{
                  command.start();
                  command.join();
                  if(command.getReturnCode() != 0){
                    if (command.isShutdown()){
                      return Boolean.TRUE;
                    }
                    throw new RuntimeException(
                        "error: " + command.getErrorMessage() +
                        " out: " + command.getResult());
                  }
                }finally{
                  command.destroy();
                }

                ii.remove();
                tableModel.removeRow(removeIndex);
              }else{
View Full Code Here


  {
    File updateDir = Installer.tempDir("update");
    Extractor.extractResource("/files/installer-update-site.zip", updateDir);

    String url = "file://" + updateDir;
    Command command = new InstallCommand(
        null, url, "org.eclim.installer", "org.eclipse.equinox.p2.director");

    try{
      command.start();
      command.join();
      if(command.getReturnCode() != 0){
        if (command.isShutdown()){
          return false;
        }
        RuntimeException re = new RuntimeException(
            "error: " + command.getErrorMessage() +
            " out: " + command.getResult());

        logger.warn(
            "Error installing eclim installer feature, " +
            "attempting uninstall/reinstall.");

        // attempt to uninstall the feature
        Command uninstall = new UninstallCommand(
            null, url, "org.eclim.installer", "org.eclipse.equinox.p2.director");
        uninstall.start();
        uninstall.join();

        // now try to install again
        command = new InstallCommand(
            null, url, "org.eclim.installer", "org.eclipse.equinox.p2.director");
        command.start();
        command.join();
        if(command.getReturnCode() != 0){
          if (command.isShutdown()){
            return false;
          }
          throw re;
        }
      }
      Installer.getProject().setProperty("eclim.installer.feature.installed", "true");
      Installer.getProject().setProperty("eclim.installer.feature.location", url);
    }finally{
      command.destroy();
    }
    return true;
  }
View Full Code Here

    Command command = null;
    try{
      log("Installing " + iu + "...");

      command = new InstallCommand(
          null, repository, iu, "org.eclipse.equinox.p2.director");
      command.start();
      command.join();
      if(command.getReturnCode() != 0){
        throw new BuildException(
View Full Code Here

TOP

Related Classes of org.eclim.installer.step.command.InstallCommand

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.