public static void main(String[] args) throws Exception {
    EntryPoint task = DEFAULT_TASK;

    if (args.length > 0) {
      String maybeTask = args[0].trim().toLowerCase(Locale.ROOT);
      if (maybeTask.matches("^.*\\.ya?ml$")) {
        task = ConfiguredMapMain::main;
        args[0] = "--schema=" + args[0];
      } else {
        EntryPoint taskFromArg0 = ENTRY_POINTS.get(maybeTask);
        if (taskFromArg0 != null) {
          args = Arrays.copyOfRange(args, 1, args.length);
          task = taskFromArg0;
        } else if (!maybeTask.contains("=") && !maybeTask.startsWith("-")) {
          System.err.println("Unrecognized task: " + maybeTask);
          System.err.println("possibilities: " + ENTRY_POINTS.keySet());
          System.exit(1);
        }
      }
    }

    task.main(args);
  }
Main entry-point for executable jar and container distributions of Planetiler, which delegates to individual {@code
public static void main(String[] args)} methods of runnable classes.
planetiler-dist/src/main/java/com/onthegomap/planetiler/Main.java