gradleアプリケーションプラグインを使用してアプリケーションフォルダーを生成します。タスクはinstallApp
私に開始スクリプトを提供しますが、からjvm引数を設定する方法がわかりませんbuild.gradle
。
など、必要ないくつかのjvm引数file.encoding
。開始スクリプトを変更してDEFAULT_JVM_OPTS
変数を設定するだけです
#!/usr/bin/env bash
##############################################################################
##
## MuzeeS3Deployer start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and MUZEE_S_DEPLOYER_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=" -Dfile.encoding=utf-8 "
引数が設定されていない場合、コンソールはメッセージを適切に表示できません。
qty:MuzeeS3Deployer qrtt1$ ./build/install/MuzeeS3Deployer/bin/MuzeeS3Deployer d
2012/10/14 #U###12:02:03 SyncCommand main
ĵ#i: no aws credentials found at /Users/qrtt1/AwsCredentials.properties
エンコーディングを設定すると:
qty:MuzeeS3Deployer qrtt1$ ./build/install/MuzeeS3Deployer/bin/MuzeeS3Deployer d
2012/10/14 下午 12:04:19 SyncCommand main
警告: no aws credentials found at /Users/qrtt1/AwsCredentials.properties
@Peterから解決策を入手しました。最後に、スクリプトに小さな変更を加えます。
startScripts {
doLast {
unixScript.text = unixScript.text.replace('DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="-Dfile.encoding=utf-8"')
windowsScript.text = windowsScript.text.replace('DEFAULT_JVM_OPTS=', 'DEFAULT_JVM_OPTS="-Dfile.encoding=utf-8"')
}
}