Multiple Configurations in liquibase-maven-plugin

Hi together,

I am trying to configure the maven plugin (3.5.3) to run two different configurations on the same DB (but different user and different changelog).
My current code for a single configuration looks like this:

I read several times about executions with different configurations. But when I try to put a configuration inside an execution I get an error and liquibase won´t find it. The goal is to include a new configuration for “USER2” with “PASSWORD2” and "changelog_2.xml"
Any suggestions?

Thanks in advance :slight_smile:

Hi Daniel,

I wanted to do it like here http://stackoverflow.com/questions/4865767/liquibase-using-maven-with-two-databases


    org.liquibase
    liquibase-maven-plugin
    3.5.3
   
       
            id1
            process-resources
           
               
                    ${basedir}/src/main/resources/db/changelog_1.xml
               
                oracle.jdbc.driver.OracleDriver
                jdbc:oracle:thin:@localhost:1521:xe
                USER1
                PASSWORD1
           
           
                update
           
       
       
            id2
            process-resources
           
               
                    ${basedir}/src/main/resources/db/changelog_2.xml
               
                oracle.jdbc.driver.OracleDriver
                jdbc:oracle:thin:@localhost:1521:xe
                USER2
                PASSWORD2
           
           
                update
           
       
   
   
       
            com.oracle
            ojdbc7
            12.1.0.2.0
       
   

Can you post the two executions example so it can be verified?

An alternative is to use a properties file in … and define one profile for each database configuration to apply it at the plugin’s execution.

So you can select the profile corresponding to the db and the changelog associated at the execution of the plugin.

Send me your full configuration of pom.xml by PV if you are interested by this alternative because i haven’t the time at this moment to post the few steps.

Regards