2014年4月19日土曜日

Gradleのビルドスクリプトにて"Could not read script"エラー

久しぶりにJenkinsのビルドジョブを実行したら下記のエラーが…。
[xxxxxxxx@yyyyyyyy zzzzz]$gradle build.gradle_
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/hoge/git/bar/build.gradle' line: 43
* What went wrong:
A problem occurred evaluating root project 'bar'.
> Could not read script 'https://github.com/valkolovos/gradle_cobertura/raw/master/repo/gradle_cobertura/gradle_cobertura/1.2.1/cobe
rturainit.gradle'.
> handshake alert: unrecognized_name
>. * 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: 5.703 secs
view raw gistfile1.txt hosted with ❤ by GitHub


handshake alert:  unrecognized_nameとは一体?
SSHの鍵の問題でもなく、メイン機でも同様に発生。
調べてみるとJava1.7のバグらしい。
Could not read script "URL" due to handshake alert: unrecognized_name #29

下記を参考にJAVA_HOMEを1.6に書き換えることで動くようになりました。
OSXでJavaのバージョンを切り替える

2014年04月21日追記
下記のようにgradle.propertiesでGradleの設定ファイルを作ってSNIを無効にするのが一番いいかも。
org.gradle.jvmargs='-Djsse.enableSNIExtension=false'


P.S.
ついでに出て間もないJava1.8で試してみたら同様のエラーが出ました…。

0 件のコメント:

コメントを投稿