ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <dave.alvar...@cartridgeorder.com>
Subject Possible to dynamically reference a property?
Date Tue, 25 Jan 2011 21:32:37 GMT
Hi,

I'm using Ant 1.8.  I load a properties file that loads define these properties ...

dev.baseurl=http://devurl
qa.baseurl=http://qaurl
approval.baseurl=http://approvalurl
staging.baseurl=http://stagingurl
prod.baseurl=http://produrl

Then I pass in this command line argument to my script "-Denv=...".  So, in my ant script,
how do I dynamically access a property using the ${env} param?  For example, if "-Denv=dev"
is passed in to the command line, what is a generic way of accessing the property, "dev.baseurl"?

Thanks, - Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message