Skip to content
Rhett Sutphin edited this page Mar 2, 2011 · 2 revisions

The ant task

Bering includes a task to execute your migration scripts from an ant build.

30 second version

<path id="cp.bering">
    <pathelement location="path/to/jdbc/driver.jar"/>
    <!-- tools/bering contains an unpacked binary distribution of bering -->
    <fileset dir="tools/bering">
        <include name="**/*.jar"/>
    </fileset>
</path>

<taskdef resource="edu/northwestern/bioinformatics/bering/antlib.xml" classpathref="cp.bering"/>

<target name="migrate" description="migrate database schema">
    <migrate classpathRef="cp.bering"
             driver="org.postgresql.Driver"
             dialect="edu.northwestern.bioinformatics.bering.dialect.PostgreSQL"
             url="jdbc:postgresql:etc"
             userid="etc"
             password=""
        />
</target>
Clone this wiki locally