ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe McGlynn" <>
Subject Ant target using "java" to create PointBase db
Date Sat, 30 Dec 2000 16:54:05 GMT
This is a tough question to ask succinctly, so please bear with me.

I want to use Ant to automate my builds, which include creating a new SQL
database instance using PointBase (a commercial Java-based ORDBMS).  They
have a command line utility that will create an "empty" db and execute a SQL
script (to create tables and so forth).  I have done this via a DOS BAT
file, so I'm sure this part works.

I get as far as the PointBase tool creating the new empty database, but it
never runs the script.  The name of the script is an argument to the
PointBase utility, which must see all of the other parameters just fine.  At
this point I am using Ant from within netbeans IDE.

I'm attaching the Ant code below, any suggestions would be hugely
appreciated.  (I know the classpath here is not done in a very nice way, but
this is just scaffolding to get this part of the build to work, I'll figure
out how to get Ant to not rely on fixed -CP later)



<?xml version="1.0"?>

<!-- Ant build routine for SW Process project SQL database   -->
<!-- developed by Joe McGlynn, 12/26/00                      -->
<!-- all rights reserved, distributable under GPL            -->

<project name="build_database" basedir="." default="all">

    <!-- define global properties for this build step            -->
    <property name="src.sql" value="${basedir}\dbsource.sql"/>
    <property name="dbtarget" value="d:\pb\network\databases"/>
    <property name="DBNAME" value="swproc"/>
    <property name="dba.uid" value="public"/>
    <property name="dba.pwd" value="public"/>

    <target name="init">
        <echo message="Begining  database creation on ${TODAY} at
        <echo message="executing from ${basedir}"/>

    <target name="all" depends="init, MakeSchema">
        <!-- <echo message="Hello ${world}!"/> -->

    <!-- Use the PointBase commander utility                     -->
    <!-- to create an empty database                             -->
    <!-- and populate it with application tables                 -->
    <target name="MakeSchema" depends="init">
        <echo message="begining target MakeSchema at ${TSTAMP} using
        <java classname="" fork="true">
                <pathelement location="D:\pb\client"/>
            <arg value="com.pointbase.jdbc.jdbcUniversalDriver" />
            <arg value="jdbc:pointbase://localhost/${DBNAME},new ${src.sql}"
            <arg value="${dba.uid} ${dba.pwd}" />
        <echo message="completed target MakeSchema at ${TSTAMP} using


View raw message