Package org.platformlayer.ops.filesystem

Examples of org.platformlayer.ops.filesystem.DownloadFileByHash


    }

    {
      String url = "http://gerrit.googlecode.com/files/gerrit-full-2.5.war";

      DownloadFileByHash download = addChild(DownloadFileByHash.class);
      download.setUrl(url);
      download.hash = new Md5Hash("aa0e35045b2467cfff66c365a351ee9c");
      download.filePath = template.getInstallWarFile();

      // // Symlinks avoid multiple versions
      // parent.addChild(ManagedSymlink.build(template.getWarFile(), zipFile));
View Full Code Here


      String url = "http://jdbc.postgresql.org/download/postgresql-9.1-903.jdbc4.jar";

      File basePath = template.getInstallDir();
      File zipFile = new File(basePath, "postgresql-9.1-903.jdbc4.jar");

      DownloadFileByHash download = parent.addChild(DownloadFileByHash.class);
      download.setUrl(url);
      download.hash = new Md5Hash("3222f2e4f133e8d1a76e9ba76463f8f5");
      download.filePath = zipFile;

      // Symlinks avoid multiple versions
      parent.addChild(ManagedSymlink.build(new File(extDir, "postgresql.jar"), zipFile));
    }

    {
      String url = "http://repo1.maven.org/maven2/commons-pool/commons-pool/1.6/commons-pool-1.6.jar";

      File basePath = template.getInstallDir();
      File zipFile = new File(basePath, "commons-pool-1.6.jar");

      DownloadFileByHash download = parent.addChild(DownloadFileByHash.class);
      download.setUrl(url);
      download.hash = new Md5Hash("5ca02245c829422176d23fa530e919cc");
      download.filePath = zipFile;

      // Symlinks avoid multiple versions
      parent.addChild(ManagedSymlink.build(new File(extDir, "commons-pool.jar"), zipFile));
    }

    {
      String url = "http://repo1.maven.org/maven2/commons-dbcp/commons-dbcp/1.4/commons-dbcp-1.4.jar";

      File basePath = template.getInstallDir();
      File zipFile = new File(basePath, "commons-dbcp-1.4.jar");

      DownloadFileByHash download = parent.addChild(DownloadFileByHash.class);
      download.setUrl(url);
      download.hash = new Md5Hash("b004158fab904f37f5831860898b3cd9");
      download.filePath = zipFile;

      // Symlinks avoid multiple versions
      parent.addChild(ManagedSymlink.build(new File(extDir, "commons-dbcp.jar"), zipFile));
    }

    {
      String url = "http://downloads.bouncycastle.org/java/bcprov-jdk15on-147.jar";

      File basePath = template.getInstallDir();
      File dest = new File(basePath, "bcprov-jdk15on-147.jar");

      DownloadFileByHash download = parent.addChild(DownloadFileByHash.class);
      download.setUrl(url);
      download.hash = new Md5Hash("7749dd7eca4403fb968ddc484263736a");
      download.filePath = dest;

      // Symlinks avoid multiple versions
      parent.addChild(ManagedSymlink.build(new File(extDir, "bcprov.jar"), dest));
View Full Code Here

      File basePath = new File("/opt/");
      File zipFile = new File(basePath, "apache-solr-3.6.0.tgz");
      File extractPath = new File(basePath, "apache-solr-3.6.0");

      DownloadFileByHash download = injected(DownloadFileByHash.class);
      download.setUrl(apacheMirror + file);
      download.hash = hash;
      download.filePath = zipFile;
      addChild(download);

      // Needed for ExpandArchive
View Full Code Here

    addChild(PosixUser.build(user, false, group));

    File installDir = template.getInstallDir();

    {
      DownloadFileByHash download = buildDownload();
      if (download != null) {
        addChild(download);
      }

      if (download != null && template.shouldExpand()) {
View Full Code Here

    // TODO: Auto-update this?? Add JenkinsLatest?

    File zipFile = template.getDistFile();

    // TODO: CAS / Cache?
    DownloadFileByHash download = injected(DownloadFileByHash.class);
    download.filePath = zipFile;
    download.specifier = specifier;

    return download;
  }
View Full Code Here

    return template;
  }

  @Override
  protected DownloadFileByHash buildDownload() {
    DownloadFileByHash download = super.buildDownload();

    download.setUrl("http://mirrors.med.harvard.edu/eclipse/jetty/7.6.8.v20121106/dist/jetty-distribution-7.6.8.v20121106.tar.gz");
    download.hash = new Md5Hash("49daf27ae78ec1188e23cd489a68bc3b");

    return download;
  }
View Full Code Here

  @Override
  protected void addChildren() throws OpsException {
    super.addChildren();

    {
      DownloadFileByHash download = addChild(DownloadFileByHash.class);
      download.filePath = template.getRootWar();
      download.specifier = "gwt-platformlayerplus:production:gwt-platformlayer-1.0-SNAPSHOT.war";
    }

    addService("service-extensions");
View Full Code Here

    addService("service-extensions");
    addService("service-domains");
  }

  private void addService(String key) throws OpsException {
    DownloadFileByHash download = addChild(DownloadFileByHash.class);
    download.filePath = new File(template.getServicesPath(), key + ".tar.gz");
    download.specifier = "platformlayerplus:production:" + key + "-1.0-SNAPSHOT-service-package.tar.gz";

    // TODO: Only unzip if newly downloaded
    ExpandArchive unzip = addChild(ExpandArchive.class);
View Full Code Here

    super.addChildren();

    for (String extension : template.getExtensions()) {
      String key = extension;

      DownloadFileByHash download = addChild(DownloadFileByHash.class);
      download.filePath = new File(template.getExtensionsPath(), key + ".jar");
      download.specifier = "platformlayerplus:production:" + key + "-1.0-SNAPSHOT.jar";
    }
  }
View Full Code Here

    return new File(getWorkDir(), "configuration.properties");
  }

  @Override
  protected void addChildren() throws OpsException {
    DownloadFileByHash download = addChild(buildDownload());
    File deployed = new File(jettyTemplate.getWarsDeployDir(), getWarName());
    addChild(ManagedSymlink.build(deployed, download.filePath));

    addChild(ManagedDirectory.build(getWorkDir(), "0700"));
View Full Code Here

TOP

Related Classes of org.platformlayer.ops.filesystem.DownloadFileByHash

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.