Package net.sourceforge.cruisecontrol.util

Examples of net.sourceforge.cruisecontrol.util.ManagedCommandline.execute()


            setActiveBranch(getBranch());
        }
           
        ManagedCommandline cmdLine = buildGetModificationsCommand(lastBuild, now);
        LOG.debug("Executing: " + cmdLine.toString());
        cmdLine.execute();
       
        List mods = parseModifications(cmdLine.getStdoutAsList());
       
        return mods;
    }
View Full Code Here


    protected void setActiveBranch(String branch) throws IOException, CruiseControlException {
        ManagedCommandline cmdLine = buildCommonCommand();
        cmdLine.createArgument().setValue("setactivebranch");
        cmdLine.createArgument().setValue(branch);
        LOG.debug("Executing: " + cmdLine.toString());
        cmdLine.execute();
        cmdLine.assertExitCode(0);
    }       
}
View Full Code Here

        if (recurse) {
            cmd.createArgument().setValue("-recurse");
        }

        try {
            cmd.execute();
            cmd.assertExitCode(0);
        } catch (Exception e) {
            LOG.error(
                "Could not reconfigure the project \"" + projectSpec + "\"." ,
                e);
View Full Code Here

        cmd.createArgument().setValue("-add_tasks");
        cmd.createArgument().setValue(tasks.toString());
        cmd.createArgument().setValue(folderNumber);

        try {
            cmd.execute();
            cmd.assertExitCode(0);
        } catch (Exception e) {
            throw new CruiseControlException(
                    "Failed to copy new tasks to folder " + folderNumber, e);
        }
View Full Code Here

        cmd.createArgument().setValue("-show");
        cmd.createArgument().setValue("folders");
        cmd.createArgument().setValue(project);

        try {
            cmd.execute();
            cmd.assertExitCode(0);
        } catch (Exception e) {
            throw new CruiseControlException("Could not get a list of folders in project " + project, e);
        }
View Full Code Here

        cmd.createArgument().setValue(getProject());
        cmd.createArgument().setValue("-subprojects");

        // Create the baseline
        try {
            cmd.execute();
            cmd.assertExitCode(0);
        } catch (Exception e) {
            StringBuffer error = new StringBuffer(
                    "Failed to create intermediate baseline for project \"");
            error.append(getProject());
View Full Code Here

        cmd.createArgument().setValue("release");
        cmd.createArgument().setValue("-project");
        cmd.createArgument().setValue(getProject());

        try {
            cmd.execute();
            cmd.assertExitCode(0);
            release = cmd.getStdoutAsString().trim();
        } catch (Exception e) {
            throw new CruiseControlException(
                    "Could not determine the release value of project \""
View Full Code Here

            if (getBranch() != null) {
                setActiveBranch(getBranch());
            }

            ManagedCommandline cmdLine = buildBootstrapCommand();
            cmdLine.execute();
            LOG.debug(cmdLine.getStdoutAsString());
            LOG.debug(cmdLine.getStderrAsString());
        } catch (IOException e) {
            LOG.error("Error executing AlienBrain bootstrap." + e);
        } catch (CruiseControlException e) {
View Full Code Here

        // Get a list of currently running CM Synergy sessions
        ManagedCommandline cmd = new ManagedCommandline(ccmExe);
        cmd.createArgument().setValue("status");
        String availableSessions;
        try {
            cmd.execute();
            cmd.assertExitCode(0);
            availableSessions = cmd.getStdoutAsString();
        } catch (Exception e) {
            LOG.warn("CM Synergy failed to provide a list of valid sessions.",
                    e);
View Full Code Here

            cmd.createArgument().setValue("-h");
            cmd.createArgument().setValue(session.getHost());
        }

        try {
            cmd.execute();
            cmd.assertExitCode(0);
        } catch (Exception e) {
            LOG.error("Could not start a CM Synergy session for "
                    + session.getName(), e);
            return null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.