Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 10708 invoked from network); 9 Apr 2004 19:53:36 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 9 Apr 2004 19:53:36 -0000 Received: (qmail 89756 invoked by uid 500); 9 Apr 2004 19:53:00 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 89703 invoked by uid 500); 9 Apr 2004 19:52:59 -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 89558 invoked from network); 9 Apr 2004 19:52:58 -0000 Received: from unknown (HELO agminet04.oracle.com) (141.146.126.231) by daedalus.apache.org with SMTP; 9 Apr 2004 19:52:58 -0000 Received: from rgmgw4.us.oracle.com (rgmgw4.us.oracle.com [138.1.191.13]) by agminet04.oracle.com (Switch-3.1.2/Switch-3.1.0) with ESMTP id i39Jr1fB004062 for ; Fri, 9 Apr 2004 12:53:03 -0700 Received: from rgmgw4.us.oracle.com (localhost [127.0.0.1]) by rgmgw4.us.oracle.com (Switch-2.1.5/Switch-2.1.0) with ESMTP id i39Jr0f18771 for ; Fri, 9 Apr 2004 13:53:00 -0600 (MDT) Received: from oracle.com (dhcp-1op5-1op6-east-144-25-143-218.us.oracle.com [144.25.143.218]) by rgmgw4.us.oracle.com (Switch-2.1.5/Switch-2.1.0) with ESMTP id i39Jqxf18757 for ; Fri, 9 Apr 2004 13:52:59 -0600 (MDT) Message-ID: <4076FF1A.4665361@oracle.com> Date: Fri, 09 Apr 2004 12:52:58 -0700 From: Sunil Ravipati X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Ant Users List Subject: Re: Using replace References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thanks bill. I read the manuaI. I wanted to use replace in a .txt file which is has name value pairs like myproject.property1 myproject.property2 = false I want to set myproject.property1 = true based on a condition in the build process. I can do a but can I do set a value to ${myproject.property1 } Thanks, Sunil Bill Rich wrote: > In the manual is a description of Replace that says > "Replace is a directory based task for replacing the occurrence of a given string with > another string in selected file. > > If you want to replace a text that crosses line boundaries, you must use a nested > element. > > The output file is only written if it differs from the existing file. This prevents > spurious rebuilds based on unchanged files which have been regenerated by this task." > > So if this is what you want to do you simply code the appropriate set of attributes (also > described in the manual) and replace will do what it is supposed to do. There are also > some examples in the manual. It is not difficult to figure out if you read the manual and > work with the examples. > > If this is not what you want to do then you need to provide a better description of your > specific requirements after reading the manual to see if there is anything that may do > what you want to do. > > I have been using Ant for about 2 months and _all_ my questions have been answered by > reading the manual and trying it out. > Thanks. Bill > > Bill Rich > Wilandra Consulting LLC > 1325 Addiewell Place > San Jose, CA 95120-3905 > phone: +1 408 268-2452 > mobile: +1 408 410-9713 > Santa Cruz: +1 831 464-9007 > fax: +1 413 669-9716 > billrich@wilandra.com or billrich@attglobal.net > http://www.wilandra.com > > -----Original Message----- > From: Sunil Ravipati [mailto:sunil.ravipati@oracle.com] > Sent: Thursday, April 08, 2004 11:25 AM > To: user@ant.apache.org > Subject: Using replace > > How do I use replace to replace a value or set a value of properties in a property file . > > Thanks, > Sunil > > --------------------------------------------------------------------- > 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