Package org.apache.commons.cli

Examples of org.apache.commons.cli.HelpFormatter.printHelp()


      } catch( ParseException exp ) {
          // oops, something went wrong
          System.err.println( "Parsing failed.  Reason: " + exp.getMessage() );
         
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp( "list", options );
      }       
    }
           
}
View Full Code Here


        }
        File file = new File(command.getOptionValue("file", defaultFile));

        if (command.hasOption("help")) {
            HelpFormatter formatter = new HelpFormatter();
            formatter.printHelp("java -jar " + file.getName(), options, true);
        } else if (command.hasOption("notice")) {
            copyToOutput("/META-INF/NOTICE.txt");
        } else if (command.hasOption("license")) {
            copyToOutput("/META-INF/LICENSE.txt");
        } else if (command.hasOption("cli")) {
View Full Code Here

        "File to scan. Pass full-path; e.g. hdfs://a:9000/hbase/.META./12/34");
      options.addOption("r", "region", true,
        "Region to scan. Pass region name; e.g. '.META.,,1'");
      if (args.length == 0) {
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp("HFile ", options, true);
        System.exit(-1);
      }
      CommandLineParser parser = new PosixParser();
      CommandLine cmd = parser.parse(options, args);
      boolean verbose = cmd.hasOption("v");
View Full Code Here

  public void printUsage()
  {
    HelpFormatter help = new HelpFormatter();
    help.setWidth(100);
    help.printHelp("java " + AvroConvertMain.class.getName() + " [options]", _options);
  }

  public boolean hasOptions()
  {
    return _cmdLine.getOptions().length > 0;
View Full Code Here

  }

  private static void printCliHelp(Options cliOptions)
  {
    HelpFormatter helpFormatter = new HelpFormatter();
    helpFormatter.printHelp("java " + BootstrapAddSource.class.getName(), cliOptions);
  }


  public static class Config
  {
View Full Code Here

  }

  private static void printCliHelp(Options cliOptions)
  {
    HelpFormatter helpFormatter = new HelpFormatter();
    helpFormatter.printHelp("java " + BootstrapDBCleanerMain.class.getName(), cliOptions);
  }

  private static void updatePropsFromCmdLine(Properties props, String cmdLinePropString)
  {
    String[] cmdLinePropSplit = cmdLinePropString.split(";");
View Full Code Here

  }

    private static void printCliHelp(Options cliOptions)
    {
      HelpFormatter helpFormatter = new HelpFormatter();
      helpFormatter.printHelp("java " + BootstrapSeederMain.class.getName(), cliOptions);
    }
  public static class StaticConfig
  {
    public SchemaRegistryStaticConfig getSchemaRegistry()
    {
View Full Code Here

  }

    private static void printCliHelp(Options cliOptions)
    {
      HelpFormatter helpFormatter = new HelpFormatter();
      helpFormatter.printHelp("java " + BootstrapSeederMain.class.getName(), cliOptions);
    }

  public static class StaticConfig
  {
    public SchemaRegistryStaticConfig getSchemaRegistry()
View Full Code Here

  }

  private static void printCliHelp(Options cliOptions)
  {
    HelpFormatter helpFormatter = new HelpFormatter();
    helpFormatter.printHelp("java " + BootstrapSeederMain.class.getName(), cliOptions);
  }

  public static class StaticConfig
  {
    private final Integer sourceId;
View Full Code Here

  }

  private static void printCliHelp(Options cliOptions)
  {
    HelpFormatter helpFormatter = new HelpFormatter();
    helpFormatter.printHelp("java " + BootstrapDBCleanerMain.class.getName(), cliOptions);
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.