3
votes

I ran "maven compile" successfully, but when I call "liquibase:diff" I get the following error. I am not sure this error corresponds to what the error actually is because I have clearly listed the database. I attached my pom.xml. I am new to liquibase and don't have much experience coding in a java environment. Thanks in advance for any assistance.

Failed to execute goal org.liquibase:liquibase-maven-plugin:3.4.2:diff > (default-cli) on project aerialrecon: A reference database must be > provided to perform a diff. -> [Help 1]

         <plugin>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-maven-plugin</artifactId>
            <version>${liquibase.version}</version>
            <configuration>
                <changeLogFile>src/main/resources/config/liquibase/master.xml</changeLogFile>
                <diffChangeLogFile>src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
                <driver>com.mysql.jdbc.Driver</driver>
                <url>jdbc:mysql://us-cdbr-azure-northcentral-b.cloudapp.net</url>
                <referencedatabaseref>aerialrecon</referencedatabaseref>
                <username>username</username>
                <password>password</password>
                <verbose>true</verbose>
                <logging>debug</logging>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.javassist</groupId>
                    <artifactId>javassist</artifactId>
                    <version>3.18.2-GA</version>
                </dependency>
                <dependency>
                    <groupId>org.liquibase.ext</groupId>
                    <artifactId>liquibase-hibernate4</artifactId>
                    <version>${liquibase-hibernate4.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-data-jpa</artifactId>
                    <version>${project.parent.version}</version>
                </dependency>
            </dependencies>
        </plugin>
1

1 Answers

5
votes

Here is my updated pom.xml. Turns out I didn't have the referenceUrl. I found on the liquibase github the code that produces the error message I was getting, and it had to do with that. Pretty ambiguous error message.

            <configuration>
                <changeLogFile>src/main/resources/config/liquibase/master.xml</changeLogFile>
                <diffChangeLogFile>src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
                <driver>com.mysql.jdbc.Driver</driver>
                <url>jdbc:mysql://us-cdbr-azure-northcentral-b.cloudapp.net/acsm_67a05aabb1dc42f</url>
                <referenceUrl>hibernate:spring:edu.depaul.se491.domain?dialect=org.hibernate.dialect.MySQLInnoDBDialect</referenceUrl>
                <username>ba6361cb0bc1cf</username>
                <password>113ee24e12c70ef</password>
                <verbose>true</verbose>
                <logging>debug</logging>
            </configuration>