Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 92950 invoked from network); 29 Jul 2005 13:27:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Jul 2005 13:27:04 -0000 Received: (qmail 6280 invoked by uid 500); 29 Jul 2005 13:26:55 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 6207 invoked by uid 500); 29 Jul 2005 13:26:55 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 6188 invoked by uid 99); 29 Jul 2005 13:26:54 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jul 2005 06:26:46 -0700 Received: by ajax.apache.org (Postfix, from userid 99) id 0E62AE0; Fri, 29 Jul 2005 15:26:42 +0200 (CEST) From: bugzilla@apache.org To: dev@ant.apache.org Subject: DO NOT REPLY [Bug 35929] New: - replace property values each time is executed X-Bugzilla-Reason: AssignedTo Message-Id: <20050729132642.0E62AE0@ajax.apache.org> Date: Fri, 29 Jul 2005 15:26:42 +0200 (CEST) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35929 Summary: replace property values each time is executed Product: Ant Version: 1.6.2 Platform: PC OS/Version: Windows XP Status: UNCONFIRMED Severity: normal Priority: P2 Component: Core tasks AssignedTo: dev@ant.apache.org ReportedBy: luisgois@netvisao.pt I have a target which echoes a property value that stores the name of the parent target (the target executing the current target). Such property value is obviously updated each time a target is called. This is no problem e.g. for , since the property value is evaluated each time, but for other tasks, like , the properties in the message/text are evaluated/replaced only once and not each time the task is executed. Is this the expected behaviour or it can be freely changed? I've performed the following changes to "fix" this behaviour : protected String messageUnreplaced = ""; // required /** * Message to write. * * @param msg Sets the value for the message variable. */ public void setMessage(String msg) { // LG this.messageUnreplaced = msg; this.message = msg; } /** * Does the work. * * @exception BuildException if something goes wrong with the build */ public void execute() throws BuildException { // LG message = getProject().replaceProperties(messageUnreplaced); if (file == null) { log(message, logLevel); } else { FileWriter out = null; try { out = new FileWriter(file.getAbsolutePath(), append); out.write(message, 0, message.length()); } catch (IOException ioe) { throw new BuildException(ioe, getLocation()); } finally { if (out != null) { try { out.close(); } catch (IOException ioex) { //ignore } } } } } /** * Set a multiline message. * @param msg the CDATA text to append to the output text */ public void addText(String msg) { // LG messageUnreplaced += msg; message += getProject().replaceProperties(msg); } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org