/** * Set a multiline message. * @param msg the CDATA text to append to the output text */ public void addText(String msg) { message += getProject().replaceProperties(msg); }
/** * File to write to. * @param file the file to write to, if not set, echo to * standard output */ public void setFile(File file) { setOutput(new FileResource(getProject(), file)); }
/** * Does the work. * * @exception BuildException if something goes wrong with the build */ public void execute() throws BuildException { try { ResourceUtils.copyResource( new StringResource(message.isEmpty() ? System.lineSeparator() : message), output == null ? new LogOutputResource(this, logLevel) : output, null, null, false, false, append, null, encoding.isEmpty() ? null : encoding, getProject(), force); } catch (IOException ioe) { throw new BuildException(ioe, getLocation()); } }