1

状況

  • Tycho を使用して Maven でビルドされる Eclipse RCP アプリケーションがあります。
  • アプリケーションは、単純なmvn install.
  • ビルド中に、Eclipse の kepler リポジトリをミラーリングする Nexus プロキシ リポジトリから p2 の依存関係が取得されます。

問題

少し前まで、このビルドは問題なく動作していました。すべての依存関係が解決され、正しくフェッチされました。

現在、Tycho OSGi 依存関係リゾルバーは、バージョン X のプラットフォーム プラグインへの依存関係の追加を開始しますが、そのプラグインの Kepler バージョンはバージョン Y です。

例えば:

  • ケプラーのバージョン: org.eclipse.emf.ecore.xmi_2.9.0.v20130528-0742
  • OSGi 依存関係: org.eclipse.emf.ecore.xmi_2.9.1.v20130827-0309

結果のMaven出力は次のとおりです。

[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: com.mycompany.products.myproduct:myproduct.gui.build:1.8.17-SNAPSHOT @ /home/myusername/programming/myproduct/gui/product-gui-1.8.x/gui/myproduct.gui.build/pom.xml
[INFO] Adding repository http://nexus.buildnet.mycompany.com/nexus/content/repositories/myproduct-releases/.meta/p2
[INFO] Adding repository http://nexus.buildnet.mycompany.com/nexus/content/repositories/myproduct-snapshots/.meta/p2
[INFO] Adding repository http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler
[INFO] Resolving dependencies of MavenProject: com.mycompany.products.myproduct:myproduct.gui.build:1.8.17-SNAPSHOT @ /home/myusername/programming/myproduct/gui/product-gui-1.8.x/gui/myproduct.gui.build/pom.xml
[INFO] Downloading org.eclipse.core.runtime
[INFO] Fetching org.eclipse.core.runtime_3.9.0.v20130326-1255.jar.pack.gz from http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler/plugins/ (0B of 31.5kB at 0B/s)
[INFO] Fetching org.eclipse.core.runtime_3.9.0.v20130326-1255.jar.pack.gz from http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler/plugins/ (4kB of 31.5kB at 0B/s)
[INFO] 1 operation remaining.
[INFO] Downloading org.eclipse.emf.ecore.xmi
[INFO] Downloading org.eclipse.ui.workbench
[INFO] Downloading org.eclipse.jface
...
<many are downloaded correctly>
...
[INFO] Downloading org.eclipse.rcp_root
[INFO] Downloading org.eclipse.swt.gtk.linux.x86
[ERROR] Internal error: java.lang.RuntimeException: "Messages while reading artifacts from child repositories": ["Problems while reading artifacts from http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler": ["Artifact not found: http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler/plugins/org.eclipse.emf.ecore.xmi_2.9.1.v20130827-0309.jar.", "Artifact not found: http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler/plugins/org.eclipse.ui.workbench_3.105.1.v20130821-1411.jar.", "Artifact not found: http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler/plugins/org.eclipse.jface_3.9.1.v20130725-1141.jar.", "Artifact not found: http://nexus.buildnet.mycompany.com/nexus/content/repositories/eclipse-kepler/plugins/org.eclipse.core.resources_3.8.101.v20130717-0806.jar.",............]] -> [Help 1]

質問

Tycho はどのように依存バージョンを選択しますか? ここで、Tycho を Kepler ターゲット プラットフォームと照合するには、プロジェクトに Kepler リポジトリを追加するだけでよいことを読みました。

Tycho は、Kepler リポジトリに保存されていないように見えるバージョンをどのように選択できますか。Tycho 依存関係リゾルバーは、これらの非 Kepler バージョンをどこで見つけますか?

4

1 に答える 1

2

greg-449 が指摘したように、最近 Kepler Service Release 1 が Kepler p2 リポジトリhttp://download.eclipse.org/releases/kepler/に追加されました。したがって、org.eclipse.emf.ecore.xmi などの新しいバージョンは、実際には Kepler リポジトリの一部です。

Tycho がアーティファクトの新しいバージョンをダウンロードできないという事実は、Nexus p2 リポジトリ プロキシの設定に問題があるようです。アーティファクト org.eclipse.emf.ecore.xmi_2.9.1.v20130827-0309.jar は、元のリポジトリで利用できます (論理的には p2 インデックスに従って、物理的には)。私の経験から、Nexus p2 リポジトリ プロキシは、複合 p2 リポジトリ (Kepler など) では確実に動作しません。

Kepler の 6 月リリース バージョンのみを使用するオプションがあります。Kepler p2 リポジトリの URL をhttp://download.eclipse.org/releases/kepler/201306260900/に置き換えるだけです。この p2 リポジトリは、完全な Kepler リポジトリを構成するサブリポジトリの 1 つです。(Kepler リポジトリのすべてのサブリポジトリを確認するには、リポジトリの compositeContent.jarを確認してください。)

于 2013-10-14T08:02:40.570 に答える