Ant task implemented

6 views
Skip to first unread message

Scott Severtson

unread,
Jun 18, 2009, 1:02:39 PM6/18/09
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.

Scott Severtson

unread,
Jul 6, 2009, 3:59:18 PM7/6/09
to Carbon Five DB Migration Discussion Group
No interest? No response? We were hoping the Ant tasks would be added
to the official repository...

Thanks,
--Scott

Kristof Jozsa

unread,
Jul 6, 2009, 4:01:53 PM7/6/09
to c5-db-m...@googlegroups.com
we patched it to be able to load migrations from the classpath but I dont think anyone's interested (or even is reading this list :))

I'd be interested but we are a maven shop.. :)

anyway, nice work,
cheers,

Kristof

Christian Nelson

unread,
Jul 6, 2009, 5:32:13 PM7/6/09
to c5-db-m...@googlegroups.com
Scott,

I'm the primary developer on the project and my time is pretty well allocated on client projects right now.  I'm listening, just not incredibly responsive (unfortunately).

We're a maven shop all throughout, which is why we haven't implemented Ant support yet.  It's something I've thought about and at one point in time was pretty psyched about adding.  I was waiting for a client project that was still using Ant, but frankly, we haven't had any in over a year.  What little time I have is generally spent on improving the maven experience and core migration framework. 

I haven't looked at the Ant tasks yet.  My primary concern with folding those tasks in to the official project is with maintenance.  I'll take a look at them soon and evaluate the impact supporting Ant and get back to you.  If it doesn't seem like it would add a lot of overhead then we should fold it in.  How would feel about being the primary maintainer for Ant support?

Thanks for the contribution... I'll get back to you soon with some potential next steps.

Cheers,
Christian 
--
Christian Nelson -- (e) cne...@slac.com -- (m) 415-378-3988
Reply all
Reply to author
Forward
0 new messages