uehaj's blog

Grな日々 - GroovyとかGrailsとかElmとかRustとかHaskellとかReactとかFregeとかJavaとか -

Grapeな日々

いま、小ブーム?なGrapeを少しだけ触ってみました。
Maven Repositoryから欲しいモジュールを探して、
たとえば HTTP Builderを実行時インストールしたければ、

http://mvnrepository.com/artifact/org.codehaus.groovy/http-builder

を見て

@Grab(group = 'org.codehaus.groovy', module='http-builder', version='latest.integration') 
class Dummy1{}

とスクリプト中に書いて、起動!待つこと数分・・遅いわ!

見てみたら、以下を依存モジュールとしてダウンロードしてました。

antlr/				net.sf.ezmorph/
asm/				net.sf.json-lib/
commons-beanutils/		net.sourceforge.nekohtml/
commons-codec/			org.apache/
commons-collections/		org.apache.ant/
commons-lang/			org.apache.commons/
commons-logging/		org.apache.httpcomponents/
jline/				org.codehaus.groovy/
junit/				xml-apis/

しょうがないね。ここは鷹揚に。
まースクリプトの実行中だから、進行状況を表示できない訳だね。
2回目以降は早くなるのだろ、、と思ったら、う、遅い。10秒ぐらいはかかるわ!将来に期待・・。