Ah yeah, property expansion issues :( I was thinking in terms of macrodefs... oh well...

Pt well taken...

On Wed, 27 Oct 2010, Vimil Saju wrote:

You will need to enable nested property expansion.ant-contrib has a Property 
Helper class to expand nested properties. You will need to include this library 
in your ant class path and also specify something similar to follows 
         <propertyhelper>         <nested/>  </propertyhelper>
--- On Wed, 10/27/10, ritchie <ganesh.devaraj...@baml.com> wrote:

From: ritchie <ganesh.devaraj...@baml.com>
Subject: Re: echo a property
To: user@ant.apache.org
Date: Wednesday, October 27, 2010, 1:44 PM


I am sorry that was  a typo when i posted it. That was not the problem.

My properties file- new.properties contains.

prod.eg=1
dev.eg=2

I am trying to access these properties in a echo.xml file

<?xml version="1.0" encoding="UTF-8"?>
<project name= "echo" default="echoeg">
<property name="env" value="${env}"/>
<target name="echoeg" description="">
<property file="new.properties"/>
<echo message="${${env}.eg}"/> -----> does not work
</target>
</project> 
From command line i do this.
ant -f echo.xml -Denv= prod

I expect the echo to display 1. It does not happen. How else can i access
that value?


--
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-890-8117 (Work)

Chief Architect FlossWare  http://sourceforge.net/projects/flossware
                           http://flossware.sourceforge.net
                           https://github.com/organizations/FlossWare

Chief Architect JPlate     http://sourceforge.net/projects/jplate
Chief Architect JavaPIM    http://sourceforge.net/projects/javapim
Chief Architect Keros      http://sourceforge.net/projects/keros
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to