Package net.sourceforge.cruisecontrol.util

Examples of net.sourceforge.cruisecontrol.util.XMLLogHelper


            throw new CruiseControlException("'filename' is required for CurrentBuildStatusPublisher");
        }
    }

    public void publish(Element cruisecontrolLog) throws CruiseControlException {
        XMLLogHelper helper = new XMLLogHelper(cruisecontrolLog);
        long interval = Long.parseLong(helper.getCruiseControlInfoProperty("interval"));
        writeFile(new Date(), interval);
    }
View Full Code Here


    }
   
   
    protected String makeFile(Element cruisecontrolLog)
            throws CruiseControlException {
        XMLLogHelper helper = new XMLLogHelper(cruisecontrolLog);

        long interval = Long.parseLong(
            helper.getCruiseControlInfoProperty("interval"));
        Date datePlusInterval = new Date((new Date()).getTime()
            + (interval * 1000));

        CurrentBuildFileWriter.writefile(
            "<span>Next Build Starts At:<br>",
View Full Code Here

    private String interfaceModel;

    public void publish(Element cruisecontrolLog)
            throws CruiseControlException {

        XMLLogHelper logHelper = new XMLLogHelper(cruisecontrolLog);
        handleBuild(!logHelper.isBuildSuccessful());
    }
View Full Code Here

    /* (non-Javadoc)
     * @see net.sourceforge.cruisecontrol.Publisher.ConditionalPublisher#shouldPublish(Element)
     */
    public boolean shouldPublish(Element log) {
        XMLLogHelper helper = new XMLLogHelper(log);
        if (helper.isBuildSuccessful()) {
            return true;
        }
        return false;
    }
View Full Code Here

        ValidationHelper.assertIsSet(fileName, "file", this.getClass());
        CurrentBuildFileWriter.validate(fileName);
    }

    public void publish(Element cruisecontrolLog) throws CruiseControlException {
        XMLLogHelper helper = new XMLLogHelper(cruisecontrolLog);
        long interval = Long.parseLong(helper.getCruiseControlInfoProperty("interval"));
        writeFile(new Date(), interval);
    }
View Full Code Here

    /* (non-Javadoc)
     * @see net.sourceforge.cruisecontrol.Publisher.ConditionalPublisher#shouldPublish(Element)
     */
    public boolean shouldPublish(Element log) {
        XMLLogHelper helper = new XMLLogHelper(log);
        if (helper.isBuildSuccessful()) {
            return false;
        }
        return true;
    }
View Full Code Here

            }        
        }
    }

    void populatePropertesForAntBuilder(Element log, Map properties) {
        XMLLogHelper helper = new XMLLogHelper(log);
        if (helper.isBuildSuccessful()) {
            properties.put("thisbuildsuccessful", "true");
        } else {
            properties.put("thisbuildsuccessful", "false");
        }
View Full Code Here

    }

    public void publish(Element cruisecontrolLog)
        throws CruiseControlException {

        XMLLogHelper helper = new XMLLogHelper(cruisecontrolLog);

        try {
            if (helper.isBuildSuccessful()) {
                writeToSocket("Success");
            } else {
                writeToSocket("Failure");
            }
        } catch (IOException e) {
View Full Code Here

        sendFileToFTPPath(out, fname);
    }

    protected String makeFile(Element cruisecontrolLog)
            throws CruiseControlException {
        XMLLogHelper helper = new XMLLogHelper(cruisecontrolLog);

        long interval = Long.parseLong(helper.getCruiseControlInfoProperty("interval"));
        writeFile(new Date(), interval);

        try {
            return Util.readFileToString(fileName);
        } catch (IOException ioe) {
View Full Code Here

   /**
    * Perform the log transform and publish the results.
    */
   public void publish(Element cruisecontrolLog) throws CruiseControlException {
      XMLLogHelper helper = new XMLLogHelper(cruisecontrolLog);
      Boolean buildSuccess = null;
      try {
         buildSuccess = new Boolean(helper.isBuildSuccessful());
      } catch (NullPointerException ne) {
         //Do Nothing - leave buildSuccess = null
      }

      //if the cruisecontrollog element or the buildSuccess attribute
      //turn out to be null, then there is nothing to do, so just return
      if (cruisecontrolLog == null || buildSuccess == null) {
         return;
      }

      //if the build failed and we are not supposed to publish on fail the return immediately
      if (!buildSuccess.booleanValue() && !publishOnFail) {
         LOG.info("Build failed and publishOnFail is false: Not publishing log.");
         return;
      }

      //If the outFileName attribute is null then construct the outFileName based
      //upon the build label that was created
      if (outFileName == null) {
         String label = helper.getCruiseControlInfoProperty("label");
         if (label == null || label.trim().length() == 0) {
            throw new CruiseControlException("The Label property is not set in the log file..."
                    + "unable to publish the log.");
         }
         LOG.debug(
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.