Cannot execute two changelogs for two databases from Liquibase maven plugin -
i have 2 different databases:oracle , db2. trying use maven plugin liquibase run 2 different changelogs on these 2 databases.
what have far:
in configuration, set both oracle , db2 connection:
<configuration> <changelogfile>src/main/resources/liquibase/changelogoracle.xml</changelogfile> <driver>oracle.jdbc.oracledriver</driver> <url>jdbc:oracle:thin:@vdfdfseisfs3:3131:orcl</url> <username>liquibase</username> <password>password</password> <changelogfile>src/main/resources/liquibase/changelogdb2.xml</changelogfile> <driver>com.ibm.db2.jcc.db2driver</driver> <url>jdbc:db2://111.111.1.11:10000/test</url> <username>admini</username> <password>password</password> </configuration>
and in execution have set this:
<execution> <phase>process-resources</phase> <goals> <goal>update</goal> </goals> </execution>
and have both dependency set up:
<dependency> <groupid>com.oracle</groupid> <artifactid>ojdbc6</artifactid> <version>11.2.0</version> </dependency> <dependency> <artifactid>com.ibm.db2.jcc</artifactid> <groupid>db2jcc</groupid> <version>4.9.78</version> <scope>system</scope> <systempath>${basedir}/my-repo/com/ibm/db2/jcc/db2jcc/4.9.78/db2jcc-4.9.78.jar</systempath> </dependency>
my question is, when run windows cmd
this: mvn liquibase:update
only db2 changelog executed, have data created db2 database, not oracle. why 1 changelog file gets executed?
i can individually execute oracle , db2 changelogs, want execute both of them together.
the liquibase maven plugin not allow 2 configurations in section of pom:
<configuration> <changelogfile>src/main/resources/liquibase/changelogoracle.xml</changelogfile> <driver>oracle.jdbc.oracledriver</driver> <url>jdbc:oracle:thin:@vdfdfseisfs3:3131:orcl</url> <username>liquibase</username> <password>password</password> <changelogfile>src/main/resources/liquibase/changelogdb2.xml</changelogfile> <driver>com.ibm.db2.jcc.db2driver</driver> <url>jdbc:db2://111.111.1.11:10000/test</url> <username>admini</username> <password>password</password> </configuration>
it reading first one. reading maven lifecycle docs, appears can want using 2 different executions, not clear how alter pom have 2 executions use 2 different configurations.
Comments
Post a Comment