Using Maven in a multi module project

This isn’t really a liquibase question, but a maven question. 

What you want to do though is specify the project. This StackOverflow Q&A covers it:

so you would want to do “mvn liquibase:update -pl mmhc” - I think.

When I run mvn liquibase:update , the update works fine but it tries to run on all modules within my project… Here is the tail end of my output. Wondering how to make it just run on the first project only…

INFO 22/01/14 2:41 PM:liquibase: mmhc-sql/liquibase.xml: null: Successfully released change log lock

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary:


[INFO] mmhc … SUCCESS [5.184s]

[INFO] mmhc - EJB … FAILURE [1.646s]

[INFO] mmhc - Web … SKIPPED


[INFO] ------------------------------------------------------------------------


[INFO] ------------------------------------------------------------------------

[INFO] Total time: 7.280s

[INFO] Finished at: Wed Jan 22 14:41:56 AST 2014

[INFO] Final Memory: 16M/312M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.0.5:update (default-cli) on project mmhc-ejb: Error setting up or running Liquibase: mmhc-sql/liquibase.xml does not exist -> [Help 1]


True, tis Maven question.

The command you shared doesn’t quite work cause it says mmhc can’t be found in the reactor. For now we’ve made a pom file in our sql directory and just run it from there explicitly. More hacking and we’ll figure er out.