Package net.sourceforge.cruisecontrol

Examples of net.sourceforge.cruisecontrol.CruiseControlException


        return "";
    }

    public void validate() throws CruiseControlException {
        if (this.getHost() == null) {
            throw new CruiseControlException("'host' not specified in configuration file.");
        }
        if (this.getUsername() == null) {
            throw new CruiseControlException("'username' not specified in configuration file.");
        }
       
        if (!this.getHandleResolveFails().equalsIgnoreCase(RESOLVE_FAIL_ERROR)
            && !this.getHandleResolveFails().equalsIgnoreCase(RESOLVE_FAIL_WARN)
            && !this.getHandleResolveFails().equalsIgnoreCase(RESOLVE_FAIL_IGNORE)) {
            throw new CruiseControlException("'handleResolveFails' attribute invalid."
                      + " - valid values are "
                      + RESOLVE_FAIL_ERROR + " | "
                      + RESOLVE_FAIL_WARN + " | "
                      + RESOLVE_FAIL_IGNORE);
        }
        if (!this.getHandleResolveConflicts().equalsIgnoreCase(RESOLVE_CONFLICTS_ERROR)
            && !this.getHandleResolveConflicts().equalsIgnoreCase(RESOLVE_CONFLICTS_WARN)
            && !this.getHandleResolveConflicts().equalsIgnoreCase(RESOLVE_CONFLICTS_IGNORE)
            && !this.getHandleResolveConflicts().equalsIgnoreCase(RESOLVE_CONFLICTS_RECIPIENT)) {
            throw new CruiseControlException("'handleResolveConflicts' attribute invalid"
                      + " - valid values are "
                      + RESOLVE_CONFLICTS_ERROR + " | "
                      + RESOLVE_CONFLICTS_WARN + " | "
                      + RESOLVE_CONFLICTS_IGNORE + " | "
                      + RESOLVE_CONFLICTS_RECIPIENT);
        }
        if (!this.getHandleQueryGroupContentFails().equalsIgnoreCase(QUERY_GROUP_CONTENT_FAIL_ERROR)
            && !this.getHandleQueryGroupContentFails().equalsIgnoreCase(QUERY_GROUP_CONTENT_FAIL_WARN)
            && !this.getHandleQueryGroupContentFails().equalsIgnoreCase(QUERY_GROUP_CONTENT_FAIL_IGNORE)) {
            throw new CruiseControlException("'handleQueryGroupContentFails' attribute invalid"
                      + " - valid values are "
                      + QUERY_GROUP_CONTENT_FAIL_ERROR + " | "
                      + QUERY_GROUP_CONTENT_FAIL_WARN + " | "
                      + QUERY_GROUP_CONTENT_FAIL_IGNORE);       
        }
View Full Code Here


                }
                bored = System.currentTimeMillis() - waitStart > this.getTimeoutMillis();
            }
            if (this.resolveFailMessage != null
                && RESOLVE_FAIL_ERROR.equalsIgnoreCase(this.getHandleResolveFails())) {
                throw new CruiseControlException(this.resolveFailMessage);
            }
            if (this.resolveConflictMessage != null
                && RESOLVE_CONFLICTS_ERROR.equalsIgnoreCase(this.getHandleResolveConflicts())) {
                throw new CruiseControlException(this.resolveConflictMessage);
            }
            if (bored && !this.isResolvedAllUsersAndGroups()) {
                throw new CruiseControlException("bored waiting for user/group resolving");
            }
        } finally {
            resolver.removeResolveListener(this);
        }
    }
View Full Code Here

                long waitStart = System.currentTimeMillis();
                while (!this.haveGroupContent() && !bored && !this.isQueryGroupContentError()) {
                    try {
                        Thread.sleep(this.getSleepMillis());
                    } catch (InterruptedException ex) {
                        throw new CruiseControlException("sleep interrupted: " + ex);
                    }
                    bored = System.currentTimeMillis() - waitStart > this.getTimeoutMillis();
                }
                if (this.isQueryGroupContentError()) {
                    throw new CruiseControlException(this.queryGroupContentFailMessage);
                }
                if (bored && !this.haveGroupContent()) {
                    throw new CruiseControlException("bored waiting to get group content for " + group);
                }
            }
        } finally {
            groupContentGetter.removeGroupContentListener(this);
        }
View Full Code Here

        return properties;
    }

    public void validate() throws CruiseControlException {
        if (vssPath == null) {
            throw new CruiseControlException("'vsspath' is a required attribute on Vss");
        }
        if (login == null) {
            throw new CruiseControlException("'login' is a required attribute on Vss");
        }
    }
View Full Code Here

        Commandline commandline = new Commandline();
        String execCommand = null;
        try {
            execCommand = (ssDir != null) ? new File(ssDir, "ss.exe").getCanonicalPath() : "ss.exe";
        } catch (IOException e) {
            throw new CruiseControlException(e);
        }
       
        commandline.setExecutable(execCommand);
        commandline.createArgument().setValue("history");
        commandline.createArgument().setValue(vssPath);
View Full Code Here

        }
    }

    public void validate() throws CruiseControlException {
        if (destDir == null) {
            throw new CruiseControlException("'destdir' not specified in configuration file.");
        }

        if (targetDirectory == null && targetFile == null) {
            throw new CruiseControlException("'dir' or 'file' must be specified in configuration file.");
        }
       
        if (targetDirectory != null && targetFile != null) {
            throw new CruiseControlException("only one of 'dir' or 'file' may be specified.");
        }
    }
View Full Code Here

    public void validate() throws CruiseControlException {
        super.validate();

        if (buildFile == null) {
            throw new CruiseControlException("'buildfile' is a required attribute on AntBuilder");
        }

        if (target == null) {
            throw new CruiseControlException("'target' is a required attribute on AntBuilder");
        }
    }
View Full Code Here



            p = Runtime.getRuntime().exec(commandLine, null, workingDir);
        } catch (IOException e) {
            throw new CruiseControlException(
                "Encountered an IO exception while attempting to execute Ant."
                    + " CruiseControl cannot continue.",
                e);
        }
View Full Code Here

            File saveFile =
                new File(
                    f.getParentFile(),
                    System.currentTimeMillis() + f.getName());
            f.renameTo(saveFile);
            throw new CruiseControlException(
                "Error reading : "
                    + f.getAbsolutePath()
                    + ".  Saved as : "
                    + saveFile.getAbsolutePath(),
                ee);
View Full Code Here

            verifyFile("HTMLEmailPublisher.css", css);

            String[] fileNames = getXslFileNames();
           
            if (fileNames == null) {
                throw new CruiseControlException("HTMLEmailPublisher.getXslFileNames() can't return null");
            }

            for (int i = 0; i < fileNames.length; i++) {
                String fileName = fileNames[i];
                verifyFile(
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.