Package net.sourceforge.cruisecontrol.util

Examples of net.sourceforge.cruisecontrol.util.XMLLogHelper


         //Prepare the transformer
         TransformerFactory tFactory = TransformerFactory.newInstance();
         Transformer transformer = tFactory.newTransformer(new StreamSource(xslFileStream));

         //cruisecontrolLog.get
         XMLLogHelper helper = new XMLLogHelper(cruisecontrolLog);
         String logFileName = helper.getLogFileName();
         LOG.info("Transforming the log file: " + logFileName + " to: " + path + " using the xslt: " + this.xsltFile);

         //perform the transform, writing out the results to the output location
         transformer.transform(new JDOMSource(cruisecontrolLog), new StreamResult(out));
View Full Code Here


        // Initialize the XMPP connection
        init();

        // Generate the message to be sent to the recipient
        XMLLogHelper helper = new XMLLogHelper(cruisecontrolLog);
        String message = createMessage(helper);

        // Send the message to the recipient
        try {
            if (chatroom) {
View Full Code Here

     *
     *  @param cruisecontrolLog JDOM Element representation of the main cruisecontrol build log
     */
    public void publish(Element cruisecontrolLog) throws CruiseControlException {

        XMLLogHelper helper = new XMLLogHelper(cruisecontrolLog);


        // Get a reference to the RSSFeed
        if (this.rssFeed == null) {
            this.rssFeed = getRSSFeed(new File(this.fileName));

            // Ensure that the rssFeed matches the config properties of the publisher.
            this.rssFeed.setProjectName(helper.getProjectName());
            this.rssFeed.setMaxLength(this.maxLength);
            this.rssFeed.setLink(this.channelLinkURL);
        }

        // Create the RSSFeedItem
View Full Code Here

            //  call getContent() wouldn't be appropriate here.
            nextLogger.log(buildLog);
        }

        //Figure out what the log filename will be.
        XMLLogHelper helper = new XMLLogHelper(buildLog);

        String logFilename;
        if (helper.isBuildSuccessful()) {
            logFilename = formatLogFileName(now, helper.getLabel());
        } else {
            logFilename = formatLogFileName(now);
        }

        this.lastLogFile = new File(logDir, logFilename);
View Full Code Here

    public Element getContent() {
        return (Element) buildLog.clone();
    }

    public boolean wasBuildSuccessful() {
        return new XMLLogHelper(buildLog).isBuildSuccessful();
    }
View Full Code Here

    public void publish(Element cruisecontrolLog)
        throws CruiseControlException {

        // put the log files
        XMLLogHelper helper = new XMLLogHelper(cruisecontrolLog);
        String uniqueDir = helper.getBuildTimestamp();
       
        File logDir = new File(srcdir + File.separator + uniqueDir);
       
        Vector knownDirs = new Vector();
        FTPClient ftp = null;
View Full Code Here

     *
     * @return <code>true</code> if the build was successful,
     *         <code>false</code> otherwise.
     */
    private boolean isBuildSuccessful(Element log) {
        XMLLogHelper helper = new XMLLogHelper(log);
        return helper.isBuildSuccessful();
    }
View Full Code Here

        publishOnFailure = shouldPublish;
    }

    public void publish(Element cruisecontrolLog)
            throws CruiseControlException {
        XMLLogHelper helper = new XMLLogHelper(cruisecontrolLog);
        if (shouldPublish(helper.isBuildSuccessful())) {
            Project project = new Project();
            String timestamp = helper.getBuildTimestamp();
            File destinationDirectory = getDestinationDirectory(timestamp);

            if (targetDirectory != null) {
                publishDirectory(project, destinationDirectory);
            }
View Full Code Here

            "'targethost' not specified in configuration file");
    }

    public void publish(Element cruisecontrolLog) throws CruiseControlException {
        if (file == null) {
            XMLLogHelper helper = new XMLLogHelper(cruisecontrolLog);
            file = helper.getLogFileName();
            LOG.debug(file);
        }

        Commandline command = createCommandline(file);
        LOG.info("executing command: " + command);
View Full Code Here

     * supposed to recieve a modification alert and a regular build email,
     * they will only recieve the modiciation alert. This prevents
     * duplicate emails (currently only the subject is different).
     */
    public void publish(Element cruisecontrolLog) throws CruiseControlException {
        XMLLogHelper helper = new XMLLogHelper(cruisecontrolLog);
        boolean important = failAsImportant && !helper.isBuildSuccessful();

        Set userSet = new HashSet();
        Set alertSet = createAlertUserSet(helper);
        String subject = createSubject(helper);;
       
View Full Code Here

TOP

Related Classes of net.sourceforge.cruisecontrol.util.XMLLogHelper

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.