ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scot P. Floess" <sflo...@nc.rr.com>
Subject Re: echo a property
Date Wed, 27 Oct 2010 20:19:27 GMT

I think you want this:

<property name="env" value="${env}"/>

You ommitted the $ sign...

On Wed, 27 Oct 2010, ritchie wrote:

>
> I have a properties file (new.properties) which contains key value pairs as
> "prod.eg=1" "dev.eg=2" . I am trying to access the property from a ant build
> file echo.xml by loading the property file in the script.
>
> <?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}.executiongroups}"/> -----> does not work
> </target>
> </project>
>
> ant -f echo.xml -Denv prod
>
> Could anyone tell me what is the correct syntax to access the property?
>

-- 
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-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message