首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Grails生成异常失败

Grails生成异常失败
EN

Stack Overflow用户
提问于 2016-05-03 03:35:33
回答 1查看 288关注 0票数 1

我正在使用Grails 3.1.6,在尝试数据库迁移时,我面临构建失败。我使用了grails dbm-generate-gorm-changelog createGame.groovy,下面是控制台输出:

代码语言:javascript
复制
FAILURE: Build failed with an exception.

* What went wrong:
Task 'dbmGenerateGormChangelog' not found in root project 'gamereview'.

* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED 

我手动添加

compile 'org.grails.plugins:database-migration:2.0.0.RC4'

代码语言:javascript
复制
compile 'org.liquibase:liquibase-core:3.3.2'   in 
`build.gradle`  file 

进口有什么问题吗?需要帮助。

解决方案:

classpath 'org.grails.plugins:database-migration:2.0.0.RC4'的主部分添加了build.gradle。解决了问题。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-05-03 04:47:18

带有命令的插件(这包括数据库迁移和hibernate等)需要位于“主”依赖项块中(与其他插件和常规的jar依赖项一起),以便这些类可供运行的应用程序使用,但是由于Gradle运行的命令也需要位于buildscript块中的依赖项块中,例如,

代码语言:javascript
复制
buildscript {
   repositories {
      mavenLocal()
      maven { url 'https://repo.grails.org/grails/core' }
   }
   dependencies {
      classpath "org.grails:grails-gradle-plugin:$grailsVersion"
      ...
      classpath 'org.grails.plugins:database-migration:2.0.0.RC4'
   }
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36995149

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档