I did a bit of research and finally got it working but even then decided the liquibase-hibernate integration wasn’t providing enough value. I’m very hopeful that in the future it will refine some of these issues but for now it’s a no go.
Our environment: liquibase, hibernate, oracle, maven
- The hibernate annotation to liquibase generation is currently only generating the table DDL without the validation or creating the sequences to go with the tables.
- The generation overwrites the file instead of intelligently appending to an exsisting file so it requires an extra step of copy/paste to the real liquibase file
- The hibernate/liquibase plugin uses ant. When the ant task configured into maven there's no way to run it independantly of the build phases w/o configuring a profile
- Maven profiles are not inherited, so they must be copy pasted into every model module and can't be put into pom-model.
- A hibernate.cfg.xml must exist in the model module for the sole purpose of the liquibase-hibernate conversion a changelog file must exist in the model module for the sole purpose of generating the liquibase xml to copy from.
- The tool will preform a diff against the database, not against an exsisting changelog file so a liquibase/hibernate must connect to that database to compare the hibernate annotations against and then only the difference is put into the changelog file.