Matt
Matt

Reputation: 3353

Liquibase maven diff not showing differences

I have just started using Liquibase, and wanted to use the maven plugin to show differences between two different databases (which I know for a fact are different because I have created a random table called 'wallawalla' in one of them) but Liquibase diff is showing no results.

Here is my pom.xml:

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.me</groupId>
        <artifactId>databasechecker</artifactId>
        <version>0.0.1-SNAPSHOT</version>


        <build>
            <plugins>
                <plugin>
                    <groupId>org.liquibase</groupId>
                    <artifactId>liquibase-maven-plugin</artifactId>
                    <version>3.2.2</version>
                    <configuration>
                        <propertyFile>liquibase.properties</propertyFile>
                    </configuration>

                    <dependencies>
                        <dependency>
                            <groupId>org.liquibase.ext</groupId>
                            <artifactId>liquibase-hibernate3</artifactId>
                            <version>3.4</version>
                        </dependency>
                        <dependency>
                            <groupId>org.liquibase</groupId>
                            <artifactId>liquibase-core</artifactId>
                            <version>3.2.2</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </build>
    </project>

Here is my liquibase.properties:

    changeLogFile=changelog-master.xml

    url=jdbc:oracle:thin:@xxxxxx.com:1521:ORCL
    driver=oracle.jdbc.driver.OracleDriver
    username=synch_dev
    password=xxxxxx


    referenceUrl=jdbc:mysql://localhost:3306/test
    referenceDriver=com.mysql.jdbc.Driver
    referenceUsername=root
    referencePassword=xxxxxx

And then I run:

    c:\Dev\eclipseworkspace\databasechecker>mvn liquibase:diff

But it doesn't show the changes:

    Diff Results:
    Reference Database: root@localhost @ jdbc:mysql://localhost:3306/test (Default Schema: test)
    Comparison Database: SYNCH_DEV @ jdbc:oracle:thin:@xxxxxx:1521:ORCL (Default Schema: SYNCH_DEV)
    Product Name:
         Reference:   'MySQL'
         Target: 'Oracle'
    Product Version:
         Reference:   '5.6.11'
         Target: 'Oracle Database 11g Release 11.2.0.2.0 - 64bit Production'
    Missing Catalog(s): NONE
    Unexpected Catalog(s): NONE
    Changed Catalog(s): NONE
    Missing Column(s): NONE
    Unexpected Column(s): NONE
    Changed Column(s): NONE
    Missing Foreign Key(s): NONE
    Unexpected Foreign Key(s): NONE
    Changed Foreign Key(s): NONE
    Missing Index(s): NONE
    Unexpected Index(s): NONE
    Changed Index(s): NONE
    Missing Primary Key(s): NONE
    Unexpected Primary Key(s): NONE
    Changed Primary Key(s): NONE
    Missing Schema(s): NONE
    Unexpected Schema(s): NONE
    Changed Schema(s): NONE
    Missing Sequence(s): NONE
    Unexpected Sequence(s): NONE
    Changed Sequence(s): NONE
    Missing Stored Procedure(s): NONE
    Unexpected Stored Procedure(s): NONE
    Changed Stored Procedure(s): NONE
    Missing Table(s): NONE
    Unexpected Table(s): NONE
    Changed Table(s): NONE
    Missing Unique Constraint(s): NONE
    Unexpected Unique Constraint(s): NONE
    Changed Unique Constraint(s): NONE
    Missing View(s): NONE
    Unexpected View(s): NONE
    Changed View(s): NONE
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESSFUL
    [INFO] ------------------------------------------------------------------------

Any ideas how I can get it to show my diffs?

EDIT

The diffs work fine when I call liquibase directly using liquibase.bat on the command line, with the properties from the liquibase.properties file passed as parameters to the command. So is it a bug with the maven plugin, or have I configured it incorrectly?

Upvotes: 1

Views: 7576

Answers (1)

Nathan Voxland
Nathan Voxland

Reputation: 15763

This looks like an issue with Liquibase 3.2.2 (https://liquibase.jira.com/browse/CORE-1987) which is fixed in the upcoming 3.2.3 release.

Upvotes: 3

Related Questions