Package org.apache.geronimo.cli

Examples of org.apache.geronimo.cli.CLParserException


    @Override
    protected void validateOptions() throws CLParserException {
        try {
            getPort();
        } catch (NumberFormatException e) {
            throw new CLParserException("Port [" + commandLine.getOptionValue(ARGUMENT_PORT_SHORTFORM) + "] is not an integer.", e);
        }
    }
View Full Code Here


    @Override
    protected void validateRemainingArgs() throws CLParserException {
        String[] args = commandLine.getArgs();
        if (0 == args.length) {
            throw new CLParserException("No command has been provided.");
        }
       
        String command = args[0];
        metaData = getCommandMetaData(command);
        if (null == metaData) {
            throw new CLParserException("Command [" + command + "] is undefined.");
        }
       
        String[] newArgs = new String[args.length - 1];
        System.arraycopy(args, 1, newArgs, 0, newArgs.length);
        commandArgs = metaData.parse(newArgs);
View Full Code Here

    @Override
    protected void validateOptions() throws CLParserException {
        try {
            getPort();
        } catch (NumberFormatException e) {
            throw new CLParserException("Port [" + commandLine.getOptionValue(ARGUMENT_PORT_SHORTFORM) + "] is not an integer.", e);
        }
    }
View Full Code Here

    @Override
    protected void validateRemainingArgs() throws CLParserException {
        String[] args = commandLine.getArgs();
        if (0 == args.length) {
            throw new CLParserException("No command has been provided.");
        }
       
        String command = args[0];
        metaData = getCommandMetaData(command);
        if (null == metaData) {
            throw new CLParserException("Command [" + command + "] is undefined.");
        }
       
        String[] newArgs = new String[args.length - 1];
        System.arraycopy(args, 1, newArgs, 0, newArgs.length);
        commandArgs = metaData.parse(newArgs);
View Full Code Here

                "Note: To specify a TargetModuleID, use the form TargetName|ModuleName");
    }
   
    public CommandArgs parse(String[] newArgs) throws CLParserException {
        if (newArgs.length == 0) {
            throw new CLParserException("Must specify a module or plan (or both) and optionally module IDs to replace");
        }
        return super.parse(newArgs);
    }
View Full Code Here

    @Override
    protected void validateOptions() throws CLParserException {
        try {
            getPort();
        } catch (NumberFormatException e) {
            throw new CLParserException("Port [" + commandLine.getOptionValue(ARGUMENT_PORT_SHORTFORM) + "] is not an integer.", e);
        }
    }
View Full Code Here

    @Override
    protected void validateRemainingArgs() throws CLParserException {
        String[] args = commandLine.getArgs();
        if (0 == args.length) {
            throw new CLParserException("No command has been provided.");
        }
       
        String command = args[0];
        metaData = getCommandMetaData(command);
        if (null == metaData) {
            throw new CLParserException("Command [" + command + "] is undefined.");
        }
       
        String[] newArgs = new String[args.length - 1];
        System.arraycopy(args, 1, newArgs, 0, newArgs.length);
        commandArgs = metaData.parse(newArgs);
View Full Code Here

                );
    }

    public CommandArgs parse(String[] newArgs) throws CLParserException {
        if (newArgs.length == 0) {
            throw new CLParserException("Must specify a keystore name");
        }
        return new BaseCommandArgs(newArgs);
    }
View Full Code Here

                );
    }

    public CommandArgs parse(String[] newArgs) throws CLParserException {
        if (newArgs.length == 0) {
            throw new CLParserException("Must specify a keystore name");
        }
        return new BaseCommandArgs(newArgs);
    }
View Full Code Here

       
        CommandLineParser parser = new GnuParser();
        try {
            commandLine = parser.parse(options, args, true);
        } catch (ParseException e) {
            throw new CLParserException(e.getMessage(), e);
        }
       
        if (0 == commandLine.getArgs().length) {
            throw new CLParserException("Must specify a bundle file");
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.cli.CLParserException

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.