예제 #1
0
  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
  @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();
  }