Thank you all for your replies.  This Ant script is actually running Canoo
WebTest.  It's testing the small GUI portion of our application. The entire
application uses several properties files, but there is just one file per
subsystem and the server designations are made by adding a
localhost.whatever or qa.whatever, etc.  I was hoping to stay away from
multiple properties files to keep the standard set by the entire app, but I
see there is no way around that.  I'll just live with it and continue on. :)

Thanks for your help!

On 5/2/06, Steve Loughran <[EMAIL PROTECTED]> wrote:

Trent Ohannessian wrote:
> Hello.  I'm trying to use the <property> task with a prefix.  Here is
the
> code I'm using:
>
> ------------------------------------------
>    <property file="./webtest.properties" prefix="${env}" />
>    <echo message="host: ${host}" />
> ------------------------------------------
>
> And here is the properties file I'm trying to load:
>
> ------------------------------------------
> localhost.host=localhost
> qa.host=qatest.domain.com
>
> localhost.port=8080
> qa.port=80
> ------------------------------------------
>
> When I use the prefix property option, none of the properties are read
and
> they are not usable in the Ant script.  What I'm trying to do is pass in
a
> property on the command line and then use the correct set of properties
> based on server.  I can see the localhost getting passed into the Ant
> script
> correctly, but it doesn't work even if I hardcode localhost into
prefix="".
>  Is this the right way to go about doing this?

I recommend having a different property file per server

<property file="secure/${server}.properties" />

Keep the server settings somewhere locked down, esp. once you add
passwords


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Learn from the mistakes of others. You can't live long enough to make them
all yourself.

Reply via email to