Package org.apache.avalon.excalibur.cli

Examples of org.apache.avalon.excalibur.cli.CLArgsParser


        HashMap namespaceMap = new HashMap();
        int mode = Emitter.MODE_ALL;
        boolean locationSet = false;

        // Parse the arguments
        CLArgsParser parser = new CLArgsParser(args, options);

        // Print parser errors, if any
        if (null != parser.getErrorString()) {
            System.err.println(JavaUtils.getMessage("j2werror00",parser.getErrorString()));
            printUsage();
        }

        // Get a list of parsed options
        List clOptions = parser.getArguments();
        int size = clOptions.size();

        try {

            // Instantiate the emitter
View Full Code Here


        String wsdlURI = null;
        HashMap namespaceMap = new HashMap();
        Emitter emitter = new Emitter(new NoopWriterFactory());

        // Parse the arguments
        CLArgsParser parser = new CLArgsParser(args, options);

        // Print parser errors, if any
        if (null != parser.getErrorString()) {
            printUsage();
        }

        // Get a list of parsed options
        List clOptions = parser.getArguments();
        int size = clOptions.size();

        try {
            // Parse the options and configure the emitter as appropriate.
            for (int i = 0; i < size; i++) {
View Full Code Here

  /**
   * Takes the command line arguments and uses them to determine how to startup JMeter.
   */
  public void start(String[] args) {
   
    CLArgsParser parser = new CLArgsParser(args, options);
    if (null != parser.getErrorString()) {
      System.err.println("Error: " + parser.getErrorString());
      return;
    }
    try {
      initializeProperties(parser);
      setProxy(parser);
      if (parser.getArgumentById(VERSION_OPT) != null) {
        System.out.println(
          "Apache JMeter, Copyright (c) 2002 The Apache Software Foundation");
        System.out.println("Version " + JMeterUtils.getJMeterVersion());
      } else if (parser.getArgumentById(HELP_OPT) != null) {
        System.out.println(
          JMeterUtils.getResourceFileAsText("org/apache/jmeter/help.txt"));
      } else if (parser.getArgumentById(SERVER_OPT) != null) {
        startServer();
      } else if (parser.getArgumentById(NONGUI_OPT) == null) {
        startGui(parser.getArgumentById(TESTFILE_OPT));
      } else {
        startNonGui(
          parser.getArgumentById(TESTFILE_OPT),
          parser.getArgumentById(LOGFILE_OPT));
      }
    } catch (IllegalUserActionException e) {
      System.out.println(e.getMessage());
      System.out.println("Incorrect Usage");
      System.out.println(CLUtil.describeOptions(options).toString());
View Full Code Here

TOP

Related Classes of org.apache.avalon.excalibur.cli.CLArgsParser

Copyright © 2018 www.massapicom. 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.