2016-05-03 14 views
1

データベースの移行中にGrails 3.1.6を使用していますが、ビルドに失敗しました。 私はgrails dbm-generate-gorm-changelog createGame.groovy を使用し、ここでコンソール出力です:Grailsが例外で失敗する

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'

compile 'org.liquibase:liquibase-core:3.3.2' in 
`build.gradle` file 

を追加インポートに問題がありますか?必要なヘルプ。

ソリューション:

はbuild.gradle内メインセクションにclasspath 'org.grails.plugins:database-migration:2.0.0.RC4'を追加しました。 それはプロベルムを解決しました。

答えて

0

実行中のアプリケーションでクラスを利用できるようにするコマンド(これはデータベース移行と休止状態などを含みます)は 'メイン'依存関係ブロック(他のプラグインと通常のjar依存関係) Gradleはコマンドを実行するので、ブロックbuildscriptブロックの依存関係ブロックに入れる必要もあります。

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

私に例を挙げてもらえますか.gradleしてください。 –

+0

私は 'buildscript'ブロックの例で答えを更新しました。 –

関連する問題