1
私はグラブルタスクを実行しているときにアプリケーションにコマンドライン引数を渡そうとしているgrails 3アプリケーションを持っています。grails run-appからgraleへのコマンドライン引数の受け渡し
ランタイム操作のために私の設定ファイルの引数を読みたいと思います。
3:11:20 PM: Executing external task 'bootRun -Dcolor=red -Dfruit=apple'...
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\docs\projects\jet\build.gradle' line: 85
* What went wrong:
A problem occurred evaluating root project 'jet'.
> Could not find method run() for arguments [[email protected]] on root project 'jet'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 8.892 secs
Could not find method run() for arguments [[email protected]] on root project 'jet'.
3:11:32 PM: External task execution finished 'bootRun -Dcolor=red -Dfruit=apple'.
:YMLの構成ガイドhere用のGrailsのドキュメントごととして、私は、私はその設定を追加し、自分のタスクを実行すると、私は次のエラーを取得する
run {
systemProperties = System.properties
}
私のbuild.gradleファイルに以下を追加しようとしました私がここに紛失しているものがあるか、これを行う良い方法があるかどうか、私に知らせてください。
同様にApplication.classにargsも渡すことはできますか? –