docs: private void processArgs(final String[] arguments) {
          args = argumentParser.processArgs(arguments);
          final Map<String, Object> definedProps = new HashMap<>(args.definedProps);
          buildFile = args.buildFile;
  
          if (args.justPrintUsage || args.justPrintVersion || args.justPrintDiagnostics || args.justPrintPlugins || args.justPrintTranstypes || args.justPrintDeliverables) {
              if (args.justPrintVersion) {
                  printVersion(args.msgOutputLevel);
              }
              if (args.justPrintUsage) {
                  printUsage();
              }
              if (args.justPrintDiagnostics) {
                  Diagnostics.doReport(System.out, args.msgOutputLevel);
              }
              if (args.justPrintPlugins) {
                  printPlugins();
              }
              if (args.justPrintTranstypes) {
                  printTranstypes();
              }
              if (args.justPrintDeliverables) {
                  if (args.projectFile == null) {
                      printErrorMessage("Error: Project file not defined");
                      printUsage();
                      throw new BuildException("");
                  }
                  printDeliverables();
              }
  
              return;
          }
  
          if (args.install) {
              buildFile = findBuildFile(System.getProperty("dita.dir"), "integrator.xml");
              targets.clear();
              if (args.installFile != null) {
                  targets.add("install");
                  final File f = new File(args.installFile.replace('/', File.separatorChar)).getAbsoluteFile();
                  if (f.exists()) {
                      definedProps.put(ANT_PLUGIN_FILE, f.getAbsolutePath());
                  } else {
                      definedProps.put(ANT_PLUGIN_FILE, args.installFile);
                  }
              } else if (args.uninstallId != null) {
                  targets.add("uninstall");
                  definedProps.put(ANT_PLUGIN_ID, args.uninstallId);
              } else {
                  targets.add("integrate");
              }
          } else {
              if (args.projectFile == null) {
                  if (!definedProps.containsKey(ANT_TRANSTYPE)) {
                      printErrorMessage("Error: Transformation type not defined");
                      printUsage();
                      throw new BuildException("");
                      //justPrintUsage = true;
                  }
                  if (!definedProps.containsKey(ANT_ARGS_INPUT)) {
                      printErrorMessage("Error: Input file not defined");
                      printUsage();
                      throw new BuildException("");
                      //justPrintUsage = true;
                  }
              }
              // default values
              if (!definedProps.containsKey(ANT_OUTPUT_DIR)) {
                  definedProps.put(ANT_OUTPUT_DIR, new File(new File("."), "out").getAbsolutePath());
              }
              if (!definedProps.containsKey(ANT_BASE_TEMP_DIR) && !definedProps.containsKey(ANT_TEMP_DIR)) {
                  definedProps.put(ANT_BASE_TEMP_DIR, new File(System.getProperty("java.io.tmpdir")).getAbsolutePath());
              }
          }
  
          projectProps = args.projectFile != null
                  ? handleProject(definedProps)
                  : Collections.singletonList(definedProps);
  
          // make sure buildfile exists
          if (!args.buildFile.exists() || buildFile.isDirectory()) {
              System.out.println("Buildfile: " + buildFile + " does not exist!");
              throw new BuildException("Build failed");
          }
  
          // Normalize buildFile for re-import detection
          buildFile = FileUtils.getFileUtils().normalize(buildFile.getAbsolutePath());
  
          if (args.msgOutputLevel >= Project.MSG_VERBOSE) {
              System.out.println("Buildfile: " + buildFile);
          }
  
          if (args.logFile != null) {
              PrintStream logTo;
              try {
                  logTo = new PrintStream(new FileOutputStream(args.logFile));
              } catch (final IOException ioe) {
                  throw new BuildException("Cannot write on the specified log file. "
                          + "Make sure the path exists and you have write permissions.");
              }
              out = logTo;
              err = logTo;
              System.setOut(out);
              System.setErr(err);
          }
          readyToRun = true;
      }