Package org.arquillian.spacelift.process

Examples of org.arquillian.spacelift.process.CommandBuilder


    private CommandTool getJBossCliTool() {

        if (SystemUtils.IS_OS_WINDOWS) {
            return Tasks.prepare(CommandTool.class)
                .command(new CommandBuilder("cmd.exe"))
                .parameters("/C", new File(environment.get("JBOSS_HOME"), "/bin/jboss-cli.bat").getAbsolutePath())
                .addEnvironment(environment);
        } else if (SystemUtils.IS_OS_LINUX || SystemUtils.IS_OS_MAC_OSX) {
            return Tasks.prepare(CommandTool.class)
                .command(new CommandBuilder(new File(environment.get("JBOSS_HOME"), "/bin/jboss-cli.sh").getAbsolutePath()))
                .addEnvironment(environment);
        } else {
            throw new IllegalStateException("Unrecognized operating system.");
        }
    }
View Full Code Here


    private CommandTool getJBossCliTool() {

        if (SystemUtils.IS_OS_WINDOWS) {
            return Tasks.prepare(CommandTool.class)
                .command(new CommandBuilder("cmd.exe"))
                .parameters("/C", new File(environment.get("JBOSS_HOME"), "/bin/jboss-cli.bat").getAbsolutePath())
                .addEnvironment(environment);
        } else {
            return Tasks.prepare(CommandTool.class)
                .command(new CommandBuilder(new File(environment.get("JBOSS_HOME"), "/bin/jboss-cli.sh").getAbsolutePath()))
                .addEnvironment(environment);
        }
    }
View Full Code Here

     * @return
     * @throws IllegalArgumentException If program name is null or empty
     */
    public CommandTool programName(CharSequence programName) throws IllegalArgumentException {
        Validate.notNullOrEmpty(programName, "Program name must not be empty nor null");
        this.commandBuilder = new CommandBuilder(programName);
        return this;
    }
View Full Code Here

     *
     * @param command the command
     * @return
     */
    public CommandTool command(Command command) {
        this.commandBuilder = new CommandBuilder(command.getFullCommand().toArray(new String[0]));
        return this;
    }
View Full Code Here

TOP

Related Classes of org.arquillian.spacelift.process.CommandBuilder

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.