Scott Severtson
unread,Jun 18, 2009, 1:02:39 PM6/18/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Carbon Five DB Migration Discussion Group
Our company has chosen to use the c5 database migration tool due to
it's simple nature and ability to use plain-old .sql files... However,
we're not a Maven shop.
I've taken the project's Maven plugin code, and used it as a basis for
equivalent custom Ant tasks. 99% of the code remained unchanged, just
minor adjustments to work better in the Ant world.
The tasks can be loaded as:
<taskdef resource="ant-tasks.properties">
<classpath>
<fileset dir="${migration.lib}">
<!-- includes the the ant task jar, c5-db-migrations jars,
and dependencies -->
<include name="**/*.jar"/>
</fileset>
<fileset dir="${main.lib}">
<!-- include any needed database drivers -->
<include name="**/postgresql-*.jar"/>
</fileset>
</classpath>
</taskdef>
And called as:
<c5-db-migrate
url="jdbc:postgresql://localhost:5432/"
username="test"
password="test"
migrationsdir="${basedir}/migrations"/>
The code is freely available (uploaded to this discussion group), and
if the project is interested, we'd be happy to do a copyright
assignment.
Note: c5-db-migrations does have a large number of dependencies, which
include: commons-collections, commons-io, commons-lang, commons-
logging, log4j, slf4j, spring-core, spring-beans, spring-jdbc, and
spring-tx. Your ${migration.lib} will need to contain a recent version
of each, plus C5's db-migrations and db-support jars.