2016-03-07 41 views
1

我成功運行「maven compile」,但是當我調用「liquibase:diff」時,出現以下錯誤。我不確定這個錯誤是否與錯誤實際相符,因爲我清楚地列出了數據庫。我附上我的pom.xml。我是liquibase的新手,在Java環境下沒有太多的編碼經驗。預先感謝您的幫助。爲什麼liquibase:diff返回「必須提供參考數據庫才能執行差異」?

未能執行目標org.liquibase:liquibase-行家-插件:3.4.2:DIFF>項目aerialrecon(缺省CLI):參考數據庫必須>提供給執行一個diff。 - > [求助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> 

回答

3

這是我更新的pom.xml。原來我沒有referenceUrl。我在liquibase github上找到了產生我得到的錯誤信息的代碼,並且它與此相關。很模糊的錯誤信息。

  <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> 
+0

看看這個:http://site.kuali.org/db/liquibase/2.0.2/liquibase-maven-plugin/diff-mojo.html#referenceUrl – Aliti

相關問題