LiquiBase with Spring configured Hibernate/JPA Annotations

Hi,

I’m using Spring to persist JPA/Hibernate annotated POJOs. I’m wondering if it would be possible to use LiquiBase at both build time (to generate the DB creation SQL - instead of hbm2ddl) and run-time (to perform data migration).

Is there any way to configure the Maven LiquiBase Plugin to read Spring’s application context at build-time, to process the JPA/Hibernated POJOs, and generate this DB creation SQL?

I’m completely new to LiquiBase. Has anyone done this kinda thing before or have any examples I could take a look at? Does it even make sense to use LiquiBase or is there a better approach?

Thx in advance,
Fraggle.

There is some support currently for building liquibase scripts from your hibernate config (like hbm2ddl).  See http://www.liquibase.org/manual/hibernate for more information.

Unfortunately, I’m not sure if the current implementation will work with annotations/jpa based hibernate configurations.  I plan to look into it more in the liquibase 2.1 timeframe.

Nathan