gpt4 book ai didi

java - gradle 的 Liquibase 插件

转载 作者:行者123 更新时间:2023-12-01 15:08:44 25 4
gpt4 key购买 nike

我一直在寻找 liquibase gradle 插件并找到 gradle-liquibase-plugin来自tlberglund

Gradle 版本 1.2

构建文件:

apply plugin: 'java'
apply plugin: 'liquibase'

repositories {
mavenCentral()
}

dependencies {
compile('org.hsqldb:hsqldb:2.2.8')
compile('org.hsqldb:sqltool:2.2.8')
compile('com.h2database:h2:1.3.167')
compile('org.liquibase:liquibase-core:2.0.1')
compile('com.augusttechgroup:groovy-liquibase-dsl:0.7.3')
compile('postgresql:postgresql:9.1-901.jdbc4')
}

buildscript {
dependencies {
classpath 'com.augusttechgroup:gradle-liquibase-plugin:0.6.1'
}
}

databases {
postgre {
url = "${postgreBaseUrl}" + "${postgreDB}"
username = "${postgreUserName}"
password = "${postgreUserPassword}"
}
}

changelogs {
main {
file = file('src/main/liquibase/mainChanges.groovy')
}
}

task dbInit << {
databases.postgre.url = "${postgreBaseUrl}"
databases.postgre.username = "${postgreRootUserName}"
databases.postgre.password = "${postgreRootUserPassword}"
changelogs.main.file = file('src/main/liquibase/tablespaceChanges.groovy')
}

运行 gradle build 失败并出现以下错误:

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':classpath'.
> Could not find group:com.augusttechgroup, module:gradle-liquibase-plugin, vers
ion:0.6.1.
Required by:
:demo:unspecified

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to
get more log output.

BUILD FAILED

有人有这个插件的经验吗,我真的很感激一个工作示例。

最佳答案

该问题与 Liquibase 插件无关。您只需在 buildscript {} 部分声明一个存储库。 buildscript {} 与脚本的其余部分完全分开。您几乎可以将其视为一个单独的文件。

关于java - gradle 的 Liquibase 插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12606814/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com