Does anybody have any suggestions on what I can do here. I think I can do
this with the script tag but I'd like to stay away from that. Could I do
this with a custom task maybe?

What I want to do is have ant generically read a dbNames property, and for
each name in that load a set of configuration params. For each name it would
copy a properties file into the final app and do the proper replacement.
Thus for each database I would have one database.properties file.

In the properties file read by ant:

dbNames=db1,db2

db1.dbUser=user1
db1.dbPassword=user1pwd
db1.dbServer=server1
db1.dbName=database1

db2.dbUser=user2
db2.dbPassword=user2pwd
db2.dbServer=server2
db2.dbName=database2

Then I have a database.properties file like this:

dbUser=@dbUser@
dbPassword=@dbPassword@
dbAlias=@dbServer@
dbURL=jdbc:informix-sqli://@dbServer@:4004/@dbName@:INFORMIXSERVER=@dbServer
@;user=@dbUser@;password=@dbPassword@

That would be replaces such that there would be two properties files in my
webapp, database_db1.properties and database_db2.properties. My app would
then know to setup two (or more) database connections.

Any suggestions are greatly appreciated.

Thanks

Matt

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

Reply via email to