Package ch.entities.javainstaller.ConfigReader

Examples of ch.entities.javainstaller.ConfigReader.Environment


          System.out.println("- " + environment.getId() + " for " + environment.getName());
        }
        break;
      } else {
        String environmentId = args[0];
        Environment environment = ini.getEnvironmentById(environmentId);
        if (environment == null) {
          System.out.println("Unknown environment " + environmentId);
          System.out.flush();
        } else {
          System.out.println("Packaging deployable for " + environment.getName() + " ...");
         
          /**
           * Open output file
           */
          ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(ini.getOutfile()));
         
          /**
           * Copying environment-agnostic contents to output
           */
          ZipInputStream contentsZip = new ZipInputStream(ClassLoader.getSystemResourceAsStream(configFileIdx + "-contents.zip"));
          copyZipEntries(zipOut, contentsZip);
          contentsZip.close();
         
          /**
           * Copying environment-aware contents to output
           */
          InputStream configZipInputStream = ClassLoader.getSystemResourceAsStream(configFileIdx + "-config-" + environment.getId() + ".zip");
          if (configZipInputStream != null) {
            ZipInputStream configZip = new ZipInputStream(configZipInputStream);
            copyZipEntries(zipOut, configZip);
            configZip.close();
          }
View Full Code Here

TOP

Related Classes of ch.entities.javainstaller.ConfigReader.Environment

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.