Package net.sourceforge.cruisecontrol

Examples of net.sourceforge.cruisecontrol.CruiseControlException


                //  to indicate that an attempt to create a directory has
                //  failed because the directory already exists.
                int rc = ftp.getReplyCode();
                if (!(ignoreFailures
                     && (rc == 550 || rc == 553 || rc == 521))) {
                    throw new CruiseControlException(
                        "could not create directory: "
                        + ftp.getReplyString());
                }
                LOG.info("directory already exists");
            } else {
                LOG.info("directory created OK");
            }
        } catch (IOException ex) {
            LOG.error(ex);
            throw new CruiseControlException(ex.getMessage());
        }
    }
View Full Code Here


            || servername == null
            || serverport == null
            || projectname == null
            || viewname == null
            || foldername == null) {
            throw new CruiseControlException(
                "'username', 'password',"
                    + " 'server', 'port', 'project', 'view',"
                    + " 'folder' and 'files' are all required for StarTeamBootstrapper");
        } else {
            return;
View Full Code Here

            LOG.info("transferring " + infile.getAbsolutePath());

            instream = new BufferedInputStream(new FileInputStream(infile));
            sendStream(ftp, instream, outfilename);
        } catch (IOException ioe) {
            throw new CruiseControlException(ioe.getMessage());
        } finally {
            if (instream != null) {
                try {
                    instream.close();
                } catch (IOException ex) {
View Full Code Here

        try {
            ftp.storeFile(outfilename, instream);
            boolean success = FTPReply.isPositiveCompletion(ftp.getReplyCode());
   
            if (!success) {
                throw new CruiseControlException("could not put file: "
                    + ftp.getReplyString());
            }
        } catch (IOException ex) {
            LOG.error(ex);
            throw new CruiseControlException(ex.getMessage());
        }
    }
View Full Code Here

        } catch (Exception e) {
            StringBuffer error = new StringBuffer(
                    "Failed to create intermediate baseline for project \"");
            error.append(getProject());
            error.append("\".");
            throw new CruiseControlException(error.toString(), e);
        }
       
        // Log the success
        StringBuffer message = new StringBuffer("Created baseline");
        if (baselineName != null) {
View Full Code Here

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

                }
                */
                if (!ftp.changeWorkingDirectory(dir)) {
                    LOG.info("makeDirs: could not CD into " + dir);
                    if (!ftp.makeDirectory(dir)) {
                        throw new CruiseControlException(
                            "could not create directory [" + dir + ", full="
                            + fullPath + "]: "
                            + ftp.getReplyString());
                    }
                    LOG.info("makeDirs: created dir " + dir);
                    if (!ftp.changeWorkingDirectory(dir)) {
                        throw new CruiseControlException(
                            "could not change to directory: "
                            + ftp.getReplyString());
                    }
                    LOG.info("makeDirs: CDed into " + dir);
                }
                knownPaths.addElement(fullPath);
            }
            ftp.changeWorkingDirectory(cwd);
        } catch (IOException ex) {
            LOG.error(ex);
            throw new CruiseControlException(ex.getMessage());
        }
    }
View Full Code Here

        try {
            fw = new FileWriter(fileName);
            fw.write(sb.toString());
            fw.close();
        } catch (IOException ioe) {
            throw new CruiseControlException("Error Writing File: " + fileName);
        } finally {
            fw = null;
        }
    }
View Full Code Here

        return properties;
    }

    public void validate() throws CruiseControlException {
        if (folder == null) {
            throw new CruiseControlException("'folder' is a required attribute for FileSystem");
        }
        //TODO: validate that folder exists
    }
View Full Code Here

        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

TOP

Related Classes of net.sourceforge.cruisecontrol.CruiseControlException

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.