I use ant to install servers for testing. In the properties file, I have a list of parameters for the database. The problem is that I need to change 5-6 parameters when changing the database. Most of them depend on the database name. Therefore, I thought that I was creating an xml file with all the various databases that we use, and just enter a name in the properties file. Then, when the build file is running, it gets the correct properties for the database in use. I created the xml file as follows:
<databases>
<database>
<server>mssql_1</server>
<port>1433</port>
<sid_instance>foobar</sid_instance>
<path></path>
<hostuser>sa</hostuser>
<hostpwd>password</hostpwd>
</database>
<database>
<server>oracle_1</server>
<port>1521</port>
<sid_instance>foobar</sid_instance>
<path>C:\\oracle\\oradata\\foobar</path>
<hostuser>system</hostuser>
<hostpwd>password</hostpwd>
</database>
</databases>
I call the file in the assembly file with
<xmlproperty file="databases.xml" />
So, when the properties file indicates that "mssql_1" will be used, I want the appropriate properties to load.
, , : "1433, 1521",
<echo message="${databases.database.port}">
, .
, .