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 validateRemainingArgs() throws CLParserException {
        if (0 == commandLine.getArgs().length) {
            throw new CLParserException("No configuration provided");
        }
    }
View Full Code Here

                );
    }

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

                "next time the server is started.");
    }

    public CommandArgs parse(String[] newArgs) throws CLParserException {
        if (newArgs.length == 0) {
            throw new CLParserException("Must specify a module or target module to start");
        }
        return super.parse(newArgs);
    }
View Full Code Here

                "target.  Geronimo does not yet support clusters as targets.");
    }

    public CommandArgs parse(String[] newArgs) throws CLParserException {
        if (0 != newArgs.length) {
            throw new CLParserException(getCommandName() + " does not take arguments.");
        }
        return new BaseCommandArgs(newArgs);
    }
View Full Code Here

                "functionality to the Geronimo server.");
    }

    public CommandArgs parse(String[] newArgs) throws CLParserException {
        if (newArgs.length != 1) {
            throw new CLParserException("Must specify Plugin CAR file");
        }
        return new BaseCommandArgs(newArgs);
    }
View Full Code Here

                "start next time the server is started.");
    }

    public CommandArgs parse(String[] newArgs) throws CLParserException {
        if (newArgs.length == 0) {
            throw new CLParserException("Must specify a module or target module to stop");
        }
        return super.parse(newArgs);
    }
View Full Code Here

                "console update to the latest defaults).");
    }

    public CommandArgs parse(String[] newArgs) throws CLParserException {
        if (1 < newArgs.length) {
            throw new CLParserException("Only one Maven repository can be specified.");
        }
        return new BaseCommandArgs(newArgs);
    }
View Full Code Here

                "and running. If multiple modules are specified, they will all be restarted.\n");
    }

    public CommandArgs parse(String[] newArgs) throws CLParserException {
        if (newArgs.length == 0) {
            throw new CLParserException("Must specify a module or target module to replace");
        }
        return new BaseCommandArgs(newArgs);
    }
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.