Package org.apache.commons.cli

Examples of org.apache.commons.cli.CommandLineParser


    static Configuration parseConfiguration(String[] args) throws ParseException {
        assert args != null;
        LOG.debug("Analyzing WindGate bootstrap arguments: {}", Arrays.toString(args));

        CommandLineParser parser = new BasicParser();
        CommandLine cmd = parser.parse(OPTIONS, args);

        String mode = cmd.getOptionValue(OPT_MODE.getOpt());
        LOG.debug("WindGate mode: {}", mode);
        String profile = cmd.getOptionValue(OPT_PROFILE.getOpt());
        LOG.debug("WindGate profile: {}", profile);
View Full Code Here


            System.exit(1);
        }
    }

    private static void start(String[] args) throws Exception {
        CommandLineParser parser = new BasicParser();
        CommandLine cmd = parser.parse(OPTIONS, args);
        String sourcePath = cmd.getOptionValue(OPT_SOURCEPATH.getOpt());
        String output = cmd.getOptionValue(OPT_OUTPUT.getOpt());
        String encoding = cmd.getOptionValue(OPT_ENCODING.getOpt(), "UTF-8");
        String[] classes = cmd.getOptionValues(OPT_CLASSES.getOpt());
View Full Code Here

            System.exit(1);
        }
    }

    private static boolean start(String[] args) throws Exception {
        CommandLineParser parser = new BasicParser();
        CommandLine cmd = parser.parse(OPTIONS, args);
        String output = cmd.getOptionValue(OPT_OUTPUT.getOpt());
        String scanPath = cmd.getOptionValue(OPT_SCANPATH.getOpt());
        String packageName = cmd.getOptionValue(OPT_PACKAGE.getOpt());
        String hadoopWork = cmd.getOptionValue(OPT_HADOOPWORK.getOpt());
        String compilerWork = cmd.getOptionValue(OPT_COMPILERWORK.getOpt());
View Full Code Here

    }

    static GenerateCreateTableTask.Configuration parseConfiguration(String... args) throws ParseException {
        LOG.debug("Analyzing arguments: {}", Arrays.toString(args));

        CommandLineParser parser = new BasicParser();
        CommandLine cmd = parser.parse(OPTIONS, args);
        String classpath = getOption(cmd, OPT_CLASSPATH);
        String pluginpath = getOption(cmd, OPT_PLUGINPATH);
        String output = getOption(cmd, OPT_OUTPUT);
        String include = getOption(cmd, OPT_INCLUDE);
        String location = getOption(cmd, OPT_LOCATION);
View Full Code Here

    static int start(String... args) {
        assert args != null;
        GenerateTask task;
        try {
            CommandLineParser parser = new BasicParser();
            CommandLine cmd = parser.parse(OPTIONS, args);
            TemplateGenerator generator = getGenerator(cmd);
            DmdlSourceRepository repository = getRepository(cmd);
            ClassLoader classLoader = getClassLoader(cmd);
            task = new GenerateTask(generator, repository, classLoader);
        } catch (Exception e) {
View Full Code Here

        return buf.toString();
    }

    static Configuration parseConfiguration(String[] args) throws ParseException {
        assert args != null;
        CommandLineParser parser = new BasicParser();
        CommandLine cmd = parser.parse(OPTIONS, args);

        String batchId = cmd.getOptionValue(OPT_BATCH_ID.getOpt());
        String flowId = cmd.getOptionValue(OPT_FLOW_ID.getOpt());
        Properties arguments = cmd.getOptionProperties(OPT_ARGUMENT.getOpt());
View Full Code Here

    static Configuration parseConfiguration(String[] args) throws ParseException {
        assert args != null;
        LOG.debug("Analyzing YAESS Explain arguments: {}", Arrays.toString(args));

        CommandLineParser parser = new BasicParser();
        CommandLine cmd = parser.parse(OPTIONS, args);

        String script = cmd.getOptionValue(OPT_SCRIPT.getOpt());
        LOG.debug("Script: {}", script);

        Configuration result = new Configuration();
View Full Code Here

        return 0;
    }

    static Arguments parseArguments(String[] args) throws ParseException {
        assert args != null;
        CommandLineParser parser = new BasicParser();
        CommandLine cmd = parser.parse(OPTIONS, args);

        String batchId = cmd.getOptionValue(OPT_BATCH_ID.getOpt());
        LOG.debug("Batch ID: {}", batchId);

        String executionIdPrefix = generateExecutionId();
View Full Code Here

    static Configuration parseConfiguration(String[] args) throws ParseException {
        assert args != null;
        LOG.debug("Analyzing arguments: {}", Arrays.toString(args));

        CommandLineParser parser = new BasicParser();
        CommandLine cmd = parser.parse(OPTIONS, args);

        ClassLoader classLoader = Main.class.getClassLoader();

        YaessLogInput source = create(cmd, OPT_INPUT, YaessLogInput.class, classLoader);
        YaessLogOutput sink = create(cmd, OPT_OUTPUT, YaessLogOutput.class, classLoader);
View Full Code Here

    static Configuration parseConfiguration(String[] args) throws ParseException {
        assert args != null;
        LOG.debug("Analyzing YAESS bootstrap arguments: {}", Arrays.toString(args));

        CommandLineParser parser = new BasicParser();
        CommandLine cmd = parser.parse(OPTIONS, args);

        String profile = cmd.getOptionValue(OPT_PROFILE.getOpt());
        LOG.debug("Profile: {}", profile);
        String script = cmd.getOptionValue(OPT_SCRIPT.getOpt());
        LOG.debug("Script: {}", script);
View Full Code Here

TOP

Related Classes of org.apache.commons.cli.CommandLineParser

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.