Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 67793 invoked from network); 2 Jun 2008 14:13:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jun 2008 14:13:59 -0000 Received: (qmail 10424 invoked by uid 500); 2 Jun 2008 14:13:59 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 10385 invoked by uid 500); 2 Jun 2008 14:13:59 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 10374 invoked by uid 99); 2 Jun 2008 14:13:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jun 2008 07:13:59 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of qazwart@gmail.com designates 209.85.128.184 as permitted sender) Received: from [209.85.128.184] (HELO fk-out-0910.google.com) (209.85.128.184) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jun 2008 14:13:10 +0000 Received: by fk-out-0910.google.com with SMTP id 19so1041188fkr.12 for ; Mon, 02 Jun 2008 07:13:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=K00JTJ0VJSoN7btIvqK8ywEsNiVeo5UAGgvDIhWVD7c=; b=DUZypcVnnGR0mvTpfEPRmvEdIpyZWG2f1uJcofBfBp2P9Z+xQ+I5FAxj4fFdMoKFoKTL8lSdaBjAeg49Y6m8wK5ZI3l+bmoinwzTOhvjUpfrLphKAXyfFnedxUWCXo/jbJCR54dO+2UQo32kAGh3HeQ3K6YoRhHU8ZlJSgKF9mo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=v1EBCQpDmC9luMjNXXzxAHcs2ii81pdm3b4VtO0IZdgq6RNCimyc7LBNIh7LzKX3efZ+/N0sSXpdpqTub1wuA7bef6EtOJzYdTXJSDwmpnCmh9vE5JNnQqSNKfn0NHXCVXGAcsf7SttWEjoxzoFOPuvVkfZlG4LkDH/U+6q5jhk= Received: by 10.82.175.7 with SMTP id x7mr830856bue.35.1212416005451; Mon, 02 Jun 2008 07:13:25 -0700 (PDT) Received: by 10.82.176.9 with HTTP; Mon, 2 Jun 2008 07:13:25 -0700 (PDT) Message-ID: Date: Mon, 2 Jun 2008 10:13:25 -0400 From: "David Weintraub" To: "Ant Users List" Subject: Re: how to echo propertyset to file? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org The easiest way to turn a resource ID into something that can be echoed is to set a property via a resource ID: Property Set: ${midlet_property_set} I just ran a test: project name=3D"myapp" default=3D"test" basedir=3D"."> Property =3D "${foo_prop}" /Users/david$ ant Buildfile: build.xml test: [echo] Property =3D "foo_four=3Dfour, foo_one=3Done, foo_three=3Dthree= , foo_two=3Dtwo" BUILD SUCCESSFUL Total time: 2 seconds Is this what you're looking for? On Mon, Jun 2, 2008 at 5:29 AM, Daniel Gr=F6ndal wrote: > Hi all! > > I have a problem echoing a set of properties to a specified file. I have = a number of properties which have a common prefix, but the exact number is = undefined, so these properties are selectable by a propertyset by I do not = know the exakt number. > > The reason for this somewhat uncommon setup is that I have created a comm= on "base" file (common.xml) that is imported into other (project specific) = build files in my workspace. This saves me a lot of time and typing since m= y projects have similiar setup. This base file has a target for creating a = jad-file (a sort of manifest file used in MIDlet development) which holds i= nformation about a jar-file. The importing build files however holds some i= nformation about midlets that is not known when creating the common base bu= ild file, and therefore I have to be able to find these properties and prin= t them in a generic way, regardless of how many they are. > > The target just looks like this: > > > > > The properties echoed (such as MIDletVersion etc) out are set by the buil= d file importing the base file. > > At the end of this target I would like to echo out all properties with a = certain prefix. The propertyset I want to output can be created like: > > > > > > But how do I echo this propertyset to the specified file? I tried using <= echoproperties> (I know this might not be the intention of echoproperties).= That gives me some additional lines at the top of the file that I do not w= ant. I also tried using pathconvert but that really needs a path, not a pro= pertyset. > > Do I have to use foreach from ant-contrib? Are there any other (reasonabl= e) way to do this? Any suggestions are more than welcome right now. > > Thanks, > > //daniel > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > --=20 -- David Weintraub qazwart@gmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org