setting properties for changeLogs when using maven plugin

Hi everybody,

maybe someone can help me out with this:
We have pom.xml with several places invoking liquibase (for different environments like dev and unittesting). We use a property in our changeLogs to be able to dynamically set a specific schema for every invocation.

My question: how can I set a property when using the maven plugin? Via commandline it’s just using a -D= . But the maven plugin does ignore properties unknown to it whether defined in a liquibase.properties file or given in the configuration part of the liquibase maven plugin. I tried to use the (rather thin documented) expressionVars tag but without success (I don’t know if I’m using it right).

Thanks for your help.
Carsten

if you use lqb 1.9.4 or above use

    org.liquibase liquibase-plugin 1.9.5 this.server.name ${syb.servicename.orig} ... ...

Note ${syb.servicename.orig} is expanded with maven properties

In 2.0 and above I’m not sure. May be the same, but I saw a new expressionVariables tag. May be Nathan plans to move and deprecate expressionVars. Wait for his answer…

Cheers

Hi taranenko,

my section was wrong. I searched for an example of the syntax but could not find it anywhere. Now it should work. Thank you!