我有一個基于基本Spring Boot的項(xiàng)目,它正在使用DDL和腳本來使用數(shù)據(jù)庫版本控制DML填充我的H2獨(dú)立數(shù)據(jù)庫。Liquibase正在創(chuàng)建表,并且數(shù)據(jù)也正在其中填充,沒有任何問題。但是,我正在嘗試回滾到早期changeset版本,但出現(xiàn)以下錯誤。不確定我的maven配置是否不正確或我的命令不正確。請指導(dǎo)。命令:mvn liquibase:rollback -Dliquibase.rollbackTag=01-insertData-addresses-users錯誤:[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 5.516 s[INFO] Finished at: 2019-05-07T16:30:05-04:00[INFO] ------------------------------------------------------------------------[ERROR] No plugin found for prefix 'liquibase' in the current project and in the plugin groups [org.mule.tools, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\R649526\.m2\repository), orgc-public (http://repo-proxy.orgorg.net/maven/content/groups/orgc-public/), myrepo (http://repo.orgc.net/maven/content/repositories/MYREPO)] -> [Help 1][ERROR][ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR][ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixExceptionsrc/main/resources/db/changelog/db.changelog-master.yaml注意:我已經(jīng)瀏覽過這個類似的 SO 鏈接(Liquibase Rollback Spring boot),但它對我沒有幫助,原因有兩個。首先,它沒有顯示 Maven 和spring-boot配置如何執(zhí)行回滾,其次,我的示例中的變更集是使用.yaml文件編寫的,該文件指向的.sql文件與上述鏈接中提到的文件完全不同。請不要將此標(biāo)記為重復(fù)。
1 回答

倚天杖
TA貢獻(xiàn)1828條經(jīng)驗(yàn) 獲得超3個贊
不確定我的 Maven 配置是否不正確或我的命令不正確。
錯誤消息No plugin found for prefix 'liquibase' in the current project
意味著 Maven 找不到具有該名稱的插件。所以,在這種情況下,你的 maven 配置是不完整的。
您需要liquibase-maven-plugin
在pom.xml
文件中定義。此外,您可能需要調(diào)整其配置以指向 Spring Boot 使用的位置。
添加回答
舉報
0/150
提交
取消