docs: public ReturnCode packageDump(boolean javaDumpsRequested) {
          // Add xml marker file for server dump tool
          File autoPdZip = new File(serverOutputDir, "autopdzip");
          File autoPd = new File(autoPdZip, "autopd/autopd-collection-environment-v2.xml");
          if (autoPd.getParentFile().mkdirs()) {
              try {
                  FileUtils.createFile(autoPd, getClass().getResourceAsStream("/OSGI-OPT/websphere/autopd-collection-environment-v2.xml"));
              } catch (IOException e) {
                  Debug.printStackTrace(e);
              }
          }
  
          captureEnvData(dumpDir, bootProps.getInstallRoot());
  
          // we also want the dump zip contains the lib inventory, so generate one. 
          File libInventory = new File(dumpDir, BootstrapConstants.SERVER_LIB_INVENTORY_FILE_NAME + ".txt");
          if (!new FolderStructureGenerator().generate(bootProps.getInstallRoot(), libInventory)) {
              System.out.println(MessageFormat.format(BootstrapConstants.messages.getString("info.LibInventoryGenerationException"), serverName));
          }
  
          List<String> javaDumps = new ArrayList<String>();
          if (javaDumpsRequested) {
              // Find java dumps locations
              File javaDumpLocationFile = new File(dumpDir + File.separator + BootstrapConstants.SERVER_DUMPED_FILE_LOCATIONS);
              Map<JavaDumpAction, String> javaDumpLocations = ProcessControlHelper.readJavaDumpLocations(javaDumpLocationFile);
  
              if (javaDumpLocations == null) {
                  // the most likely reason for this being null is a file not found
                  System.out.println(MessageFormat.format(BootstrapConstants.messages.getString("error.fileNotFound"), javaDumpLocationFile.getAbsolutePath()));
              } else {
                  javaDumps.addAll(javaDumpLocations.values());
                  // Remove any blank entries
                  javaDumps.remove("");
  
                  // If we're on z/OS, convert the javacore (if present) from EBCDIC before packaging.
                  if (ServerDumpUtil.isZos() && Charset.isSupported("IBM-1047")) {
                      String javacoreName = javaDumpLocations.get(JavaDumpAction.THREAD);
                      if ((javacoreName != null) && !(javacoreName.equals(""))) {
                          try {
                              File javacoreEbcdic = new File(javacoreName);
                              File javacoreAscii = new File(javacoreEbcdic.getAbsolutePath() + ".tmp");
                              javacoreAscii.createNewFile();
                              javacoreAscii.setWritable(true);
  
                              InputStreamReader reader = new InputStreamReader(new FileInputStream(javacoreEbcdic), Charset.forName("IBM-1047"));
                              OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(javacoreAscii), Charset.forName("US-ASCII"));
                              int readInt;
                              while ((readInt = reader.read()) != -1) {
                                  writer.write(readInt);
                              }
  
                              reader.close();
                              writer.close();
                              if (javacoreAscii.exists()) {
                                  javacoreEbcdic.delete();
                                  javacoreAscii.renameTo(javacoreEbcdic);
                              }
                          } catch (IOException e) {
                              System.out.println(MessageFormat.format(BootstrapConstants.messages.getString("error.cannotConvertEbcdicToAscii"), javacoreName));
                              Debug.printStackTrace(e);
                          }
                      }
                  }
              }
          }
  
          ReturnCode rc = packageServerDumps(archive, javaDumps);
  
          // clean up javaDumps
          if (!!!javaDumps.isEmpty()) {
              for (String f : javaDumps) {
                  File file = new File(f);
                  file.delete();
              }
          }
  
          // clean up autoPdZip
          FileUtils.recursiveClean(autoPdZip);
  
          return rc;
      }