Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your property file has two entities with the same value. The <code>&lt;xmlproperty&gt;</code> task reads through the entire XML file, and then uses the entities to set the property name. If you happen to have two entities with the same property, the value of that particular property will be both of them together.</p> <p>What most people do is have a separate property file for each database, then use the <code>&lt;property&gt;</code> task with the <code>file</code> parameter to read in that particular property file. So you should have two property files:</p> <h2>database.mssql.properties</h2> <pre><code>server=mssql_1 port=1433 sid_instance=foobar path= hostuser=sa hostpwd=password </code></pre> <h2>database.oracle.properties</h2> <pre><code>server=oracle_1 port=1521 sid_instance=foobar path=C:/oracle/oradata/foobar hostuser=ssytem hostpwd=password </code></pre> <p>Then, in your <code>build.xml</code> file, you read in one and only one of the properties file based upon the database:</p> <pre><code>&lt;property name="database" value="mssql"/&gt; &lt;!-- Default database --&gt; &lt;property name="database.file value="database.${database}.properties"/&gt; &lt;fail message="No such database file &amp;quot;${database.file}&amp;quot;"&gt; &lt;condition&gt; &lt;not&gt; &lt;available file="${database.file} type="file"/&gt; &lt;/not&gt; &lt;/condition&gt; &lt;/fail&gt; &lt;property file="${database.file}"/&gt; </code></pre> <p>When someone runs Ant, they can use the <code>-D</code> parameter to set the database:</p> <pre><code>$ ant -Ddatabase=oracle </code></pre> <p>This will override the <code>database</code> property inside the <code>build.xml</code> file and use the Oracle database. If you don't specify a database, it will use the default database (the MS SQL one).</p> <p>And, this will also work if another property file specifies the property file name:</p> <pre><code>&lt;property file="build.properties"&gt; &lt;!-- Contains database name --&gt; &lt;property name="database.file" value="database.${database}.properties"/&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload