コード例 #1
0
ファイル: JBoss7SshDriver.java プロジェクト: dralves/brooklyn
  public void install() {
    String url =
        format(
            "http://download.jboss.org/jbossas/7.1/jboss-as-%s/jboss-as-%s.tar.gz",
            getVersion(), getVersion());
    String saveAs = format("jboss-as-distribution-%s.tar.gz", getVersion());

    List<String> commands = new LinkedList<String>();
    commands.addAll(CommonCommands.downloadUrlAs(url, getEntityVersionLabel("/"), saveAs));
    commands.add(CommonCommands.INSTALL_TAR);
    commands.add("tar xzfv " + saveAs);

    newScript(INSTALLING).failOnNonZeroResultCode().body.append(commands).execute();
  }
コード例 #2
0
ファイル: QpidSshDriver.java プロジェクト: kraman/brooklyn
  @Override
  public void install() {
    DownloadResolver resolver =
        entity.getManagementContext().getEntityDownloadsManager().newDownloader(this);
    List<String> urls = resolver.getTargets();
    String saveAs = resolver.getFilename();
    expandedInstallDir =
        getInstallDir()
            + "/"
            + resolver.getUnpackedDirectoryName(format("qpid-broker-%s", getVersion()));

    List<String> commands = new LinkedList<String>();
    commands.addAll(CommonCommands.downloadUrlAs(urls, saveAs));
    commands.add(CommonCommands.INSTALL_TAR);
    commands.add("tar xzfv " + saveAs);

    newScript(INSTALLING).failOnNonZeroResultCode().body.append(commands).execute();
  }