Jun 07, 2006
[Misc] Eclipse Update Site のミラーサイトを作成する
Eclipse 3.x では Software Update 機能が提供され、プラグインのインストールが楽になった。 ただし、この機能、当然作業の度に Update Site に接続する必要がある。 大人数で一度に環境を整えたり、ネットワークの帯域が不足していたり、サーバが落ちていたりするとプラグインのインストールが延々終わらなかったりする。 プロジェクトの開始時にプラグインのインストールが出来ないと困るので、プロジェクトローカルの Update Site を準備してみた。
Subclipse Update Site の構築
Subversion Client Plugin である Subclipse の Update Site を用意する。 Subclipse は、Update Site をそのままアーカイビングしたファイルを提供してくれている。 そのため、Update Site の構築は非常に楽。
- こちらから Update Site のアーカイブをダウンロードする。(ここでは site-1.0.1.zip を前提とする)
-
Apache 経由でアクセスできる位置にアーカイブを展開する。
# mkdir /var/www/eclipse-plugins/subclipse # cd /var/www/eclipse-plugins/subclipse # unzip ./site-1.0.1.zip Archive: ./site-1.0.1.zip creating: features/ inflating: features/org.tigris.subversion.subclipse_1.0.1.jar creating: plugins/ inflating: plugins/org.tigris.subversion.javahl.win32_1.0.0.jar inflating: plugins/org.tigris.subversion.subclipse.core_1.0.1.jar inflating: plugins/org.tigris.subversion.subclipse.ui_1.0.1.jar inflating: plugins/org.tigris.subversion.subclipse_1.0.1.jar inflating: site.xml # ls features plugins site-1.0.1.zip site.xml # chown -R www-data:www-data .
- Eclipse の Software Update で http://www.example.com/eclipse-plugins/subclipse/ (URL はアーカイブの展開先に合わせる) を指定してみる。プラグインが見えれば OK。
Maven 2.0 integration plugin Update Site の構築
Maven2 用の Eclipse Plugin の Update Site を用意する。 Maven2.0 integration plugin は残念ながら Update Site 用ファイルのアーカイブは提供されていない。 そのため、必要となるファイルを集めて Update Site を作成する。
- こちらから site.xml をダウンロードする。
- こちらから Plugin の jar ファイルをダウンロードする。(ここでは org.maven.ide.eclipse.feature_0.0.9.jar を前提とする)
-
site.xml を編集する。
全バージョンをミラーリングするのであれば編集は不要。
今回はプロジェクトで使用するバージョンだけをミラーリングするので、その他バージョンに関する記述を削除する。
<?xml version="1.0" encoding="UTF-8"?> <site> <feature url="features/org.maven.ide.eclipse.feature_0.0.9.jar" id="org.maven.ide.eclipse.feature" version="0.0.9"> <category name="Maven 2.0 integration"/> </feature> <category-def name="Maven 2.0 integration" label="org.maven.ide.eclipse"/> </site> -
Update Site 用にディレクトリ構成を作成し、ファイルを設置する。
/var/www/eclipse-plugins/maven2/ ├ features/ │ └ org.maven.ide.eclipse.feature_0.0.9.jar └ site.xml
- Eclipse の Software Update で http://www.example.com/eclipse-plugins/maven2/ (URL は上記で作成したディレクトリに合わせる) を指定してみる。プラグインが見えれば OK。
本格的に Eclipse Update Site のミラーサイトを構築する
ネットワークやマシンの問題で私には無理ではあるけれど、公開用 Eclipse Update Site のミラーサイトを構築することもできる。
- Re: [eclipse-mirrors] Eclipse update site mirror
- http://dev.eclipse.org/mhonarc/lists/eclipse-mirrors/msg00151.html
Simply add this RSYNC line to your script:
rsync -rtlv --delete download.eclipse.org::eclipseMirror/eclipse/updates/ /path/to/eclipse.org mirror/eclipse/updates/
I will be looking for your Update content at this URL:
http://eclipse.gabriel.co.hu/eclipse/updates/3.1/site.xml
When you are synced, please let me know and I'll add you to the Updates list.
自作 Plugin 用 Update Site の構築
当然ながら、自作 Plugin 用 Update Site を構築することもできる。
- FAQ How do I create an update site (site.xml)?
- http://wiki.eclipse.org/index.php/FAQ_How_do_I_create_an_update_site_(site.xml)%3F



