<!-- This was added because we were several people (in a course) deploying to same app server>
<property environment="env"/>
<property name="unique.name" value="${name}.${env.COMPUTERNAME}"/-->
<!-- =================================================================== -->
<!-- Fails if XDoclet 1.2.x is not on classpath -->
<!-- =================================================================== -->
<target name="fail-if-no-xdoclet-1.2" unless="xdoclet1.2+">
<fail>
You must download several jar files before you can build Middlegen.
</fail>
</target>
<!-- =================================================================== -->
<!-- Create tables -->
<!-- =================================================================== -->
<target
name="create-tables"
depends="init,fail-if-no-xdoclet-1.2,check-driver-present,panic-if-driver-not-present"
description="Create tables"
>
<echo>Creating tables using URL ${database.url}</echo>
<sql
classpath="${database.driver.classpath}"
driver="${database.driver}"
url="${database.url}"
userid="${database.userid}"
password="${database.password}"
src="${database.script.file}"
print="true"
output="result.txt"
/>
</target>
<target name="check-driver-present">
<available file="${database.driver.file}" type="file" property="driver.present"/>
</target>
<target name="panic-if-driver-not-present" unless="driver.present">
<fail>
The JDBC driver you have specified by including one of the files in ${basedir}/config/database
doesn't exist. You have to download this driver separately and put it in ${database.driver.file}
Please make sure you're using a version that is equal or superior to the one we looked for.
If you name the driver jar file differently, please update the database.driver.file property
in the ${basedir}/config/database/xxx.xml file accordingly.
</fail>
</target>
<!-- =================================================================== -->
<!-- ant properties/targets for MS SQL Server -->
<!-- note: this is not a proper xml file (there is no root element) -->
<!-- it is intended to be imported from a *real* xml file -->
<!-- =================================================================== -->
<property name="database.script.file" value="${src.dir}/sql/${name}-mssql.sql"/>
<property name="database.driver.classpath" value="F:/Progs/Java/MSSQL2000DrvforJDBC/lib/msbase.jar;F:/Progs/Java/MSSQL2000DrvforJDBC/lib/msutil.jar;F:/Progs/Java/MSSQL2000DrvforJDBC/lib/mssqlserver.jar"/>
<property name="database.driver.file" value="F:/Progs/Java/MSSQL2000DrvforJDBC/lib/mssqlserver.jar"/>
<property name="database.driver.file" value="F:/Progs/Java/MSSQL2000DrvforJDBC/lib/msutil.jar"/>
<property name="database.driver.file" value="F:/Progs/Java/MSSQL2000DrvforJDBC/lib/msbase.jar"/>
<property name="database.driver" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
<property name="database.url" value="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=DBForTest"/>
<property name="database.userid" value="sa"/>
<property name="database.password" value=""/>
<!-- In MS SQL the schema is the owner of the tables as displayed by SQL Server Enterprise Manager -->
<property name="database.schema" value="dbo"/>
<!-- In MS SQL the catalog is the database, for example, 'Northwind' -->
<property name="database.catalog" value="DBForTest"/>