Return-Path: X-Original-To: apmail-ant-user-archive@www.apache.org Delivered-To: apmail-ant-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B650DC992 for ; Wed, 6 Jun 2012 23:39:15 +0000 (UTC) Received: (qmail 29730 invoked by uid 500); 6 Jun 2012 23:39:15 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 29598 invoked by uid 500); 6 Jun 2012 23:39:15 -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 29587 invoked by uid 99); 6 Jun 2012 23:39:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2012 23:39:14 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.161.173] (HELO mail-gg0-f173.google.com) (209.85.161.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2012 23:39:07 +0000 Received: by ggnp1 with SMTP id p1so9234ggn.4 for ; Wed, 06 Jun 2012 16:38:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:reply-to:in-reply-to:references:date :message-id:subject:from:to:content-type:x-gm-message-state; bh=h7eZc0+YsPjFbYkvVdXQgMvrSVp0Jmy4zQOfD2M6nr0=; b=GW+jsCevA4VfWzJV86In6K0lKcV060l+DCtKY2HTdGy9KuFQevg8IQiyMq5vm+zK4w UfjIONihWj+DSM3cAN1DIjMHW+R5bFoKkR0YSBz3PP5CmwKs6Xb6GOzFf/B3jUWpcuGa xMKMyn9AopWJjpukLD9dpPs0naHMfT/1x5tofC+ZprlG24qG6u+H27BnEz7zaAkkYNYL f+7jRwULbWi9v/nK0gWWJVaCVFkqub8tF/09qxj9A6rTZmdSdNP2hrTzxVx5q9UA44lb yMbrbZifndFt4DCzemo08jfYB6EUg/d83tFzhjDCyWkAyQvvmhdXKSBGuetG/ULUP6mo hq0w== MIME-Version: 1.0 Received: by 10.60.21.38 with SMTP id s6mr22250711oee.53.1339025925417; Wed, 06 Jun 2012 16:38:45 -0700 (PDT) Received: by 10.182.226.101 with HTTP; Wed, 6 Jun 2012 16:38:45 -0700 (PDT) X-Originating-IP: [203.99.128.1] Reply-To: simon@flaxx.net In-Reply-To: References: Date: Thu, 7 Jun 2012 11:38:45 +1200 Message-ID: Subject: Re: xmlproperty not expanding From: Simon Murcott To: Ant Users List Content-Type: multipart/alternative; boundary=e89a8fb2068aa12a0a04c1d644a0 X-Gm-Message-State: ALoCoQlL0qDVEXe1YTybLG/HrkTXCpSZGbQX/jH0/F1jAkxPe9Z+b/nYztP9L2TtfmIFyVNOs+QE X-Virus-Checked: Checked by ClamAV on apache.org --e89a8fb2068aa12a0a04c1d644a0 Content-Type: text/plain; charset=ISO-8859-1 Hi Ronald, if you look at the manual for XmlProperty you will find the following statement: "By default, this load does *no* processing of the input. In particular, unlike the Property task , property references (i.e., ${foo}) are not resolved." Unfortunately, the manual adds confusion here as the examples it provides do not reflect this statement. Also have a look at the echoproperties task, it helps a whole heap with debugging properties. http://ant.apache.org/manual/Tasks/xmlproperty.html http://ant.apache.org/manual/Tasks/echoproperties.html On 7 June 2012 01:23, Ronald Albury wrote: > My understanding is that the xmlproperty task is supposed to expand > references to external properties just like the regular property task > does. However, it does not seem to work for me. The output below is from > ant 1.7 - however I have downloaded the latest ant and it has the same > issue. > > *Here is my ant file:* > > > > > > > > > ant.version = ${ant.version} > ant.java.version = ${ant.java.version} > java.vendor = ${java.vendor} > java.version = ${java.version} > > > > > > > > > > > > > > > > *Here is the regular property file:* > props.demo = This is properties demo > props.cmd = This is properties with cmd ${cmd.demo} > props.global = This is properties with global ${global.demo} > > *Here is the xml property file:* > > This is xmlTest demo > This is xmlTest with cmd ${cmd.demo} > This is xmlTest with global ${global.demo} > > > *Here is the output when I run with -Dcmd.demo="i am command demo" * > show: > [echo] ant.version = Apache Ant version 1.7.1 compiled on June 27 2008 > [echo] ant.java.version = 1.6 > [echo] java.vendor = IBM Corporation > [echo] java.version = 1.6.0 > [echo] cmd.demo property = i am command demo > [echo] global.demo property = i am global demo > [echo] props.demo property = This is properties demo > [echo] xml.demo property = This is xmlTest demo > [echo] props.cmd property = This is properties with cmd i am command > demo > [echo] props.global property = This is properties with global i am > global demo > [echo] xml.cmd property = This is xmlTest with cmd ${cmd.demo} > [echo] xml.global property = This is xmlTest with global ${global.demo} > --e89a8fb2068aa12a0a04c1d644a0--