Package org.kohsuke.args4j

Examples of org.kohsuke.args4j.CmdLineParser.printUsage()


      try {
         parser.parseArgument(args);
      } catch (CmdLineException e) {
         // handling of wrong arguments
         System.err.println(e.getMessage());
         parser.printUsage(System.err);
         System.exit(1);
      }
      new MainApp(arguments).run();
   }
View Full Code Here


       
        try {
            runner.processFlagFile(System.out);
           
            if (runner.m_displayHelp) {
                parser.printUsage(System.out);
                return;
            }
           
            runner.prune();
        } catch (Exception e) {
View Full Code Here

            executor.shutdown();
        } catch (CmdLineException e) {
            System.err.println(e.getMessage());
            System.err.println("s3mper fs verify [options]");
            // print the list of available options
            parser.printUsage(System.err);
            System.err.println();

            System.err.println(" Example: s3mper fs verify "+parser.printExample(OptionHandlerFilter.ALL));
        }
    }
View Full Code Here

            parser.parseArgument(args);
        } catch (CmdLineException e) {
            System.err.println(e.getMessage());
            System.err.println("java SampleMain [options...] arguments...");
            // print the list of available options
            parser.printUsage(System.err);
            System.err.println();

            System.err.println(" Example: s3mper metastore "+parser.printExample(OptionHandlerFilter.ALL));

            return;
View Full Code Here

            parser.parseArgument(args);
        } catch (CmdLineException e) {
            System.err.println(e.getMessage());
            System.err.println("s3mper meta delete_ts [options]");
            // print the list of available options
            parser.printUsage(System.err);
            System.err.println();

            System.err.println(" Example: s3mper meta delete_ts "+parser.printExample(OptionHandlerFilter.ALL));

            return;
View Full Code Here

    sw.append(ALT_USAGE_PREFIX + " <source> <destination>\n");
    sw.append(ALT_USAGE_PREFIX + " [OPTION]... [<value>...]\n\n");
    sw.append("Options:");
    System.out.println(sw.toString());
    parser.setUsageWidth(100);
    parser.printUsage(System.out);
    System.exit(0);
  }

  private void runServer(String path, String port) {
    JettyServer.run(path, port);
View Full Code Here

        try {
            parser.parseArgument(args);
            entry.run();
        } catch (CmdLineException e) {
            System.err.println(e.getMessage());
            parser.printUsage(System.err);
        }
    }

    public ConsoleEntry(final Console error, final Console output) {
        this.output = output;
View Full Code Here

        catch (CmdLineException e)
        {
            System.out.print("Usage: " + dcs.appName);
            parser.printSingleLineUsage(System.out);
            System.out.println();
            parser.printUsage(System.out);

            System.out.println("\n" + e.getMessage());
            return;
        }
View Full Code Here

        catch (CmdLineException e)
        {
            System.out.print("Usage: batch");
            parser.printSingleLineUsage(System.out);
            System.out.println();
            parser.printUsage(System.out);

            System.out.println("\n" + e.getMessage());

            final List<String> algorithmIds = Lists.transform(batch.algorithms,
                ProcessingComponentDescriptorToId.INSTANCE);
View Full Code Here

            System.err.println(e.getMessage());
            return 1;
        } catch (CmdLineException e) {
            System.err.println(e.getMessage());
            System.err.println("Usage: bees "+args.get(0)+" "+p.printExample(ExampleMode.REQUIRED));
            p.printUsage(System.err);
            return 1;
        }
    }

    protected CmdLineParser createParser() {
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.