Questions from a dummy:Howdo you experts get everything works together?

Hello Experts, I’m totally new to liquibase and just signup for this forum.

Last week i read about liquibase quick start and all the related tutorials but i feel like i don’t get the whole drift about using it for consecutive change in the database and i have some questions still opened.

i’m developing an application in netbeans using maven with 3 modules: dbunit module, service module and the webapp module.As you might have guessed dbunit does the database stuffs, the service is on top of it and the webapp uses the the parent pom has the declaration of all groupids, artifactids and versions for all jars and plugins.

I manage to generate the changelog file from command line since the db is already existing and supposing i set up everything correctly using liquibase maven plugin :

question 1 : What will the liquibase goal be since i’m doing any database change right now let’s say it’s a normal build?

Question 2 : If i want to add for example a new table to the database, will i add the this new changeSet to the same changelog file or i have to create a new changelog.xml file?

Question 3 : I believe when the dbunit runs it will run the changeset but is that necessary to add the plugin to th webapp module too (maybe to run the liquibase goal before deployment with cargo plugin) or the dbunit will take care of that?

Question 4 : What exactly subversion helps with keep the states of the changelog (assuming there is only one changelog refere to question 2)

thanks for reading this and for you help.

I saw your post on stackoverflow.  Did that answer your question?


Hey Nathan!

Your answer helped me but i’ve decided to use liquibase from spring since my project is maven+spring+hibernate kinda project.Now i’m interested in how you don’t use hbm2ddl because it seems one is overriding the other right and i’m kinda of confused and blocked for a while now.i use hsqldb for testing environment but the project runs on mysql.
Now the structure of my project is like .i hope this gave you enough information on what i want to achieve.thanks for your answer.

I added an answer to the stackoverflow question.  Hopefully it helps you out.

I’m on vacation for the next week, so I may not be able to answer more for a while.