I am looking to use a versioned database migrations tool like DBdeploy in a java project which uses Hibernate as the ORM and uses Gradle as the build system. I am unable to lookup any documentation on running DBDeploy on Gradle. Also is there a Hibernate based migrations manager, which can understand schema changes by looking at changes in Hibernate classes/definitions?
Asked
Active
Viewed 944 times
3 Answers
3
Since dbdeploy has an Ant task, it should be straightforward to use from Gradle. See Using Ant Tasks in the Gradle User Guide.

Josh
- 2,842
- 8
- 45
- 51

Peter Niederwieser
- 121,412
- 21
- 324
- 259
2
I am unable to lookup any documentation on running DBDeploy on Gradle.
Almost any build system can likely call either the ant task or the command-line interface for dbdeploy.
Also is there a Hibernate based migrations manager, which can understand schema changes by looking at changes in Hibernate classes/definitions?
You might want to look at Liquibase. I haven't actually used it (I've used dbdeploy), but it has hibernate integration that looks like what you want.

Don Roby
- 40,677
- 6
- 91
- 113
1
this post shows how to use DBDeploy in Gradle: http://blog.codeborne.com/2012/09/using-dbdeploy-in-gradle.html

Andrei Solntsev
- 480
- 2
- 8
-
1While it's great to post links to useful information, please make sure you also include a brief summary of that information in case the linked page becomes inaccessible. – Mac Sep 27 '12 at 22:21