Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 92589 invoked from network); 2 Jul 2004 07:25:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Jul 2004 07:25:09 -0000 Received: (qmail 62572 invoked by uid 500); 2 Jul 2004 07:25:32 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 62439 invoked by uid 500); 2 Jul 2004 07:25:29 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 62395 invoked by uid 500); 2 Jul 2004 07:25:28 -0000 Received: (qmail 62332 invoked by uid 99); 2 Jul 2004 07:25:25 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Fri, 02 Jul 2004 00:25:24 -0700 Received: (qmail 92494 invoked by uid 1146); 2 Jul 2004 07:24:56 -0000 Date: 2 Jul 2004 07:24:56 -0000 Message-ID: <20040702072456.92493.qmail@minotaur.apache.org> From: bodewig@apache.org To: ant-cvs@apache.org Subject: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs SubAnt.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N bodewig 2004/07/02 00:24:56 Modified: . Tag: ANT_16_BRANCH WHATSNEW CONTRIBUTORS src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH SubAnt.java Log: merge Revision Changes Path No revision No revision 1.503.2.116 +2 -0 ant/WHATSNEW Index: WHATSNEW =================================================================== RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.503.2.115 retrieving revision 1.503.2.116 diff -u -r1.503.2.115 -r1.503.2.116 --- WHATSNEW 28 Jun 2004 08:50:31 -0000 1.503.2.115 +++ WHATSNEW 2 Jul 2004 07:24:56 -0000 1.503.2.116 @@ -129,6 +129,8 @@ * and didn't close the session. Bugzilla Report 25935. +* and XmlLogger didn't play nicley together. + Other changes: -------------- * doc fix concerning the dependencies of the ftp task 1.1.2.20 +1 -0 ant/CONTRIBUTORS Index: CONTRIBUTORS =================================================================== RCS file: /home/cvs/ant/CONTRIBUTORS,v retrieving revision 1.1.2.19 retrieving revision 1.1.2.20 diff -u -r1.1.2.19 -r1.1.2.20 --- CONTRIBUTORS 23 Jun 2004 13:33:18 -0000 1.1.2.19 +++ CONTRIBUTORS 2 Jul 2004 07:24:56 -0000 1.1.2.20 @@ -21,6 +21,7 @@ Charles Hudak Charlie Hubbard Chris Povirk +Christian Knorr Christoph Wilhelms Christophe Labouisse Christopher A. Longo No revision No revision 1.9.2.8 +89 -2 ant/src/main/org/apache/tools/ant/taskdefs/SubAnt.java Index: SubAnt.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/SubAnt.java,v retrieving revision 1.9.2.7 retrieving revision 1.9.2.8 diff -u -r1.9.2.7 -r1.9.2.8 --- SubAnt.java 14 Apr 2004 15:42:40 -0000 1.9.2.7 +++ SubAnt.java 2 Jul 2004 07:24:56 -0000 1.9.2.8 @@ -61,6 +61,7 @@ private Path buildpath; + private Ant ant = null; private String target = null; private String antfile = "build.xml"; private File genericantfile = null; @@ -72,6 +73,90 @@ private Vector properties = new Vector(); private Vector references = new Vector(); private Vector propertySets = new Vector(); + + /** + * Pass output sent to System.out to the new project. + * + * @param output a line of output + * @since Ant 1.6.2 + */ + public void handleOutput(String output) { + if (ant != null) { + ant.handleOutput(output); + } else { + super.handleOutput(output); + } + } + + /** + * Process input into the ant task + * + * @param buffer the buffer into which data is to be read. + * @param offset the offset into the buffer at which data is stored. + * @param length the amount of data to read + * + * @return the number of bytes read + * + * @exception IOException if the data cannot be read + * + * @see Task#handleInput(byte[], int, int) + * + * @since Ant 1.6.2 + */ + public int handleInput(byte[] buffer, int offset, int length) + throws IOException { + if (ant != null) { + return ant.handleInput(buffer, offset, length); + } else { + return super.handleInput(buffer, offset, length); + } + } + + /** + * Pass output sent to System.out to the new project. + * + * @param output The output to log. Should not be null. + * + * @since Ant 1.6.2 + */ + public void handleFlush(String output) { + if (ant != null) { + ant.handleFlush(output); + } else { + super.handleFlush(output); + } + } + + /** + * Pass output sent to System.err to the new project. + * + * @param output The error output to log. Should not be null. + * + * @since Ant 1.6.2 + */ + public void handleErrorOutput(String output) { + if (ant != null) { + ant.handleErrorOutput(output); + } else { + super.handleErrorOutput(output); + } + } + + /** + * Pass output sent to System.err to the new project. + * + * @param output The error output to log. Should not be null. + * + * @since Ant 1.6.2 + */ + public void handleErrorFlush(String output) { + if (ant != null) { + ant.handleErrorFlush(output); + } else { + super.handleErrorFlush(output); + } + } + /** * Runs the various sub-builds. */ @@ -167,7 +252,7 @@ return; } - Ant ant = createAntTask(directory); + ant = createAntTask(directory); String antfilename = null; try { antfilename = file.getCanonicalPath(); @@ -193,7 +278,9 @@ + "' of: " + antfilename + "\n" + e.toString(), Project.MSG_WARN); - } + } finally { + ant = null; + } } /** --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org