Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 9634 invoked from network); 8 Dec 2004 21:47:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Dec 2004 21:47:56 -0000 Received: (qmail 31042 invoked by uid 500); 8 Dec 2004 21:47:45 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 31010 invoked by uid 500); 8 Dec 2004 21:47:45 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 9892 invoked by uid 99); 8 Dec 2004 21:37:05 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: How to replace a property defined string with multiple lines Date: Wed, 8 Dec 2004 16:37:00 -0500 Message-ID: <46C5DCD410224A42BE3151AC8AE75E4E03FE1F61@tormbxw01.prod.quest.corp> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: How to replace a property defined string with multiple lines Thread-Index: AcTZbZr21tHfimbcS1Gj7Za+IhkzYQC/sHGwADwPhGAABCJkUA== From: "Daisy Guo" To: "Ant Users List" X-OriginalArrivalTime: 08 Dec 2004 21:37:01.0295 (UTC) FILETIME=[0D53BFF0:01C4DD6E] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Kajsa: Thanks for the reply. But the property is set properly in this case - if I add the following ************************* insert.token=3D${insert.token} ************************* Right before the replace task, it will print out: [echo] ************************* [echo] insert.token=3Djava [echo] ************************* [echo] [replace] Replacing in E:\common\test\mod_startWebLogic.cmd: ${insert.token} --> [replace] [replace] @rem = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [replace] @rem INTEGRATE START [replace] @rem = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D .... -----Original Message----- From: Kajsa.Anderson@thomson.com [mailto:Kajsa.Anderson@thomson.com]=20 Sent: Wednesday, December 08, 2004 2:36 PM To: user@ant.apache.org Subject: RE: How to replace a property defined string with multiple lines Generally when you see ${some.property.name}, it's because the property isn't actually being set... You might try adding an just after the spot where you think you're setting it, and see what you get. =20 Kajsa Anderson -----Original Message----- From: Daisy Guo [mailto:Daisy.Guo@quest.com] Sent: Friday, December 03, 2004 2:24 PM To: user@ant.apache.org Subject: How to replace a property defined string with multiple lines Hi, I have a task which given a script and a insert point, it would create a new script based on the old one and add a few lines at the insert point (see attached). It failed to find the insert point, because ant looks for ${insert.token} instead of the property value. =20 Is there a work around this? I'm using Ant version 1.6.2 Thanks Daisy integrate_impl: [delete] Deleting: E:\common\test\mod_startWebLogic.cmd [copy] Copying 1 file to E:\common\test [copy] Copying E:\common\test\startWebLogic.cmd to E:\common\test\mod_startWebLogic.cmd [replace] Replacing in E:\common\test\mod_startWebLogic.cmd: ${insert.token} --> [replace] [replace] @rem = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [replace] @rem INTEGRATE START [replace] @rem = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [replace] [replace] set PRODUCT_HOME=3D... [replace] call "%PRODUCT_HOME%\bin\... [replace] set OPTIONS=3D [replace] [replace] @rem = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [replace] @rem INTEGRATE - END [replace] @rem = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [replace] [replace] ${insert.token} [replace] Replaced 0 occurrences in 0 files. =09 =09 ${insert.token} =20 @rem =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @rem INTEGRATE START @rem =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D set PRODUCT_HOME=3D... call "%PRODUCT_HOME%\bin\... set OPTIONS=3D @rem =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @rem INTEGRATE - END @rem =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ${insert.token} =09 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org