SSブログ

Antでivyを使う [Windows]

先日、W3C Web統合検証ツールのエントリにも書きましたが、近頃のAntはivyと呼ばれるライブラリ管理ツールを併用して、必要なライブラリは、外から取得することもできるようになってるらしい。
Antを実行してみて、以下のようなエラーが出る場合は、ivy.jarが無い可能性が高いです。
BUILD FAILED
build.xml:18: Problem: failed to create task or type antlib:org.apache.ivy.ant:retrieve
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any / declarations have taken place.
No types or tasks have been defined in this namespace yet

This appears to be an antlib declaration.
Action: Check that the implementing library exists in one of:
-C:\ant\lib
-C:\Users\hoge\.ant\lib
-a directory added on the command line with the -lib argument
Apache Ivyのサイトから、ivy.jarをダウンロードして、Antをインストールしているフォルダの下にあるlibフォルダに取ってきたivy.jarをコピーするだけで使えるようになります。ivyはネットワーク経由でファイルをダウンロードするので、会社等でproxyを通す必要があるときは、以下の環境変数を設定します。
set ANT_OPTS=-Dhttp.proxyHost=(hostname) -Dhttp.proxyPort=(port no)




タグ:Java ant IVY proxy
nice!(1)  コメント(0)  トラックバック(0) 
共通テーマ:パソコン・インターネット

nice! 1

コメント 0

コメントを書く

お名前:
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。

トラックバック 0

トラックバックの受付は締め切りました

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。