Package org.apache.commons.cli.avalon

Examples of org.apache.commons.cli.avalon.CLOption


        Properties jmeterProps = JMeterUtils.getJMeterProperties();
        List<CLOption> clOptions = parser.getArguments();
        int size = clOptions.size();

        for (int i = 0; i < size; i++) {
            CLOption option = clOptions.get(i);
            String name = option.getArgument(0);
            String value = option.getArgument(1);

            switch (option.getDescriptor().getId()) {
            case PROPFILE2_OPT: // Bug 33920 - allow multiple props
                File f = new File(name);
                FileInputStream inStream = null;
                try {
                    inStream = new FileInputStream(f);
View Full Code Here


                    throw ex;
                }
                startOptionalServers();
            } else {
                String testFile=null;
                CLOption testFileOpt = parser.getArgumentById(TESTFILE_OPT);
                if (testFileOpt != null){
                    testFile = testFileOpt.getArgument();
                    if (USE_LAST_JMX.equals(testFile)) {
                        testFile = LoadRecentProject.getRecentFile(0);// most recent
                    }
                }
                if (parser.getArgumentById(NONGUI_OPT) == null) {
                    startGui(testFile);
                    startOptionalServers();
                } else {
                    CLOption rem=parser.getArgumentById(REMOTE_OPT_PARAM);
                    if (rem==null) { rem=parser.getArgumentById(REMOTE_OPT); }
                    CLOption jtl = parser.getArgumentById(LOGFILE_OPT);
                    String jtlFile = null;
                    if (jtl != null){
                        jtlFile=processLAST(jtl.getArgument(), ".jtl"); // $NON-NLS-1$
                    }
                    startNonGui(testFile, jtlFile, rem);
                    startOptionalServers();
                }
            }
View Full Code Here

        List<CLOption> clOptions = parser.getArguments();
        int size = clOptions.size();

        for (int i = 0; i < size; i++) {
            CLOption option = clOptions.get(i);
            String name = option.getArgument(0);
            String value = option.getArgument(1);
            FileInputStream fis = null;

            switch (option.getDescriptor().getId()) {

            // Should not have any text arguments
            case CLOption.TEXT_ARGUMENT:
                throw new IllegalArgumentException("Unknown arg: "+option.getArgument());

            case PROPFILE2_OPT: // Bug 33920 - allow multiple props
                try {
                    fis = new FileInputStream(new File(name));
                    Properties tmp = new Properties();
View Full Code Here

        Properties jmeterProps = JMeterUtils.getJMeterProperties();
        List clOptions = parser.getArguments();
        int size = clOptions.size();

        for (int i = 0; i < size; i++) {
            CLOption option = (CLOption) clOptions.get(i);
            String name = option.getArgument(0);
            String value = option.getArgument(1);

            switch (option.getDescriptor().getId()) {
            case PROPFILE2_OPT: // Bug 33920 - allow multiple props
                File f = new File(name);
                try {
                    jmeterProps.load(new FileInputStream(f));
                } catch (FileNotFoundException e) {
View Full Code Here

                // Start the server
        startServer(JMeterUtils.getPropDefault("server_port", 0));// $NON-NLS-1$
        startOptionalServers();
      } else {
              String testFile=null;
              CLOption testFileOpt = parser.getArgumentById(TESTFILE_OPT);
              if (testFileOpt != null){
                  testFile = testFileOpt.getArgument();
                  if (USE_LAST_JMX.equals(testFile)) {
                      testFile = LoadRecentProject.getRecentFile(0);// most recent
                  }
              }
                if (parser.getArgumentById(NONGUI_OPT) == null) {
                  startGui(testFile);
                  startOptionalServers();
                } else {
                  CLOption rem=parser.getArgumentById(REMOTE_OPT_PARAM);
                  if (rem==null) { rem=parser.getArgumentById(REMOTE_OPT); }
                  CLOption jtl = parser.getArgumentById(LOGFILE_OPT);
                  String jtlFile = null;
                  if (jtl != null){
                      jtlFile=processLAST(jtl.getArgument(), ".jtl"); // $NON-NLS-1$
                  }
                  startNonGui(testFile, jtlFile, rem);
                  startOptionalServers();
                }
            }
View Full Code Here

   
    List clOptions = parser.getArguments();
    int size = clOptions.size();

    for (int i = 0; i < size; i++) {
      CLOption option = (CLOption) clOptions.get(i);
      String name = option.getArgument(0);
      String value = option.getArgument(1);
            FileInputStream fis = null;           

      switch (option.getDescriptor().getId()) {
     
      // Should not have any text arguments
            case CLOption.TEXT_ARGUMENT:
                throw new IllegalArgumentException("Unknown arg: "+option.getArgument());
     
            case PROPFILE2_OPT: // Bug 33920 - allow multiple props
        try {
                    fis = new FileInputStream(new File(name));
          Properties tmp = new Properties();
View Full Code Here

                    throw ex;
                }
                startOptionalServers();
            } else {
                String testFile=null;
                CLOption testFileOpt = parser.getArgumentById(TESTFILE_OPT);
                if (testFileOpt != null){
                    testFile = testFileOpt.getArgument();
                    if (USE_LAST_JMX.equals(testFile)) {
                        testFile = LoadRecentProject.getRecentFile(0);// most recent
                    }
                }
                if (parser.getArgumentById(NONGUI_OPT) == null) {
                    startGui(testFile);
                    startOptionalServers();
                } else {
                    CLOption rem=parser.getArgumentById(REMOTE_OPT_PARAM);
                    if (rem==null) { rem=parser.getArgumentById(REMOTE_OPT); }
                    CLOption jtl = parser.getArgumentById(LOGFILE_OPT);
                    String jtlFile = null;
                    if (jtl != null){
                        jtlFile=processLAST(jtl.getArgument(), ".jtl"); // $NON-NLS-1$
                    }
                    startNonGui(testFile, jtlFile, rem);
                    startOptionalServers();
                }
            }
View Full Code Here

        List<CLOption> clOptions = parser.getArguments();
        int size = clOptions.size();

        for (int i = 0; i < size; i++) {
            CLOption option = clOptions.get(i);
            String name = option.getArgument(0);
            String value = option.getArgument(1);
            FileInputStream fis = null;

            switch (option.getDescriptor().getId()) {

            // Should not have any text arguments
            case CLOption.TEXT_ARGUMENT:
                throw new IllegalArgumentException("Unknown arg: "+option.getArgument());

            case PROPFILE2_OPT: // Bug 33920 - allow multiple props
                try {
                    fis = new FileInputStream(new File(name));
                    Properties tmp = new Properties();
View Full Code Here

        startOptionalServers();
      } else if (parser.getArgumentById(NONGUI_OPT) == null) {
        startGui(parser.getArgumentById(TESTFILE_OPT));
        startOptionalServers();
      } else {
        CLOption rem=parser.getArgumentById(REMOTE_OPT_PARAM);
        if (rem==null) rem=parser.getArgumentById(REMOTE_OPT);
        startNonGui(parser.getArgumentById(TESTFILE_OPT),
            parser.getArgumentById(LOGFILE_OPT),
            rem);
        startOptionalServers();
View Full Code Here

   
    List clOptions = parser.getArguments();
    int size = clOptions.size();

    for (int i = 0; i < size; i++) {
      CLOption option = (CLOption) clOptions.get(i);
      String name = option.getArgument(0);
      String value = option.getArgument(1);
            FileInputStream fis = null;           

      switch (option.getDescriptor().getId()) {
     
      // Should not have any text arguments
            case CLOption.TEXT_ARGUMENT:
                throw new IllegalArgumentException("Unknown arg: "+option.getArgument());
     
            case PROPFILE2_OPT: // Bug 33920 - allow multiple props
        try {
                    fis = new FileInputStream(new File(name));
          Properties tmp = new Properties();
View Full Code Here

TOP

Related Classes of org.apache.commons.cli.avalon.CLOption

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.