Package com.slim.utils

Examples of com.slim.utils.SSHClientUtils$MyUserInfo


      String remoteEarFile = remotePath + "/" + project.getArtifact().getArtifactId() + CommandUtils.SUFFIXE_EAR;

      String remoteXmlFile = remotePath + "/" + project.getArtifact().getArtifactId() + CommandUtils.SUFFIXE_XML;

      SSHClientUtils sshclient = new SSHClientUtils(hostServer, hostUser, hostPassword, logger);

      logger.info("Creating directory " + remotePath + " ...");
      sshclient.sendShell("mkdir -p " + remotePath, remoteDirectory);

      logger.info("Moving " + localEarFile + " to " + remoteEarFile + " ...");
      sshclient.sendFile(localEarFile, remoteEarFile);

      logger.info("Moving " + localXmlFile + " to " + remoteXmlFile + " ...");
      sshclient.sendFile(localXmlFile, remoteXmlFile);

      StringBuilder commandDeploy = new StringBuilder();
      commandDeploy.append(CommandUtils.getRemoteAppManageBin()).append(" -deploy");
      commandDeploy.append(" -ear ").append(remoteEarFile);
      commandDeploy.append(" -deployconfig ").append(remoteXmlFile);
      commandDeploy.append(" -app ").append(appTibco);
      commandDeploy.append(" -domain ").append(tibcoDomain);
      commandDeploy.append(" -user ").append(tibcoUser);
      commandDeploy.append(" -pw ").append(tibcoPassword);

      logger.info("Executing " + commandDeploy.toString() + " ...");

      sshclient.sendShell(commandDeploy.toString(), remoteDirectory);

    } catch (Exception e) {
      e.printStackTrace();
      throw new MojoExecutionException("Error in deploying ear ..." + e.getMessage());
    }
View Full Code Here

TOP

Related Classes of com.slim.utils.SSHClientUtils$MyUserInfo

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.