p2.inf ファイルで作成されたインストール可能なユニットを介してプラグインを構成するいくつかの機能を含む製品を (Eclipse リポジトリ モジュールで) 構築しています。
これは、 tycho-p2-director-pluginの構成パラメーターにデフォルト値targetPlatform
を使用している限り機能します。私の知る限り、これにより、ディレクターはローカルの Maven リポジトリからp2 メタデータとアーティファクトにアクセスできます。source
<project_dir>/target/targetPlatformRepository/context.xml
いくつかのバンドルを変更したいので、source
パラメーターをに変更しましたrepository
。これにより、ディレクターは生成されたリポジトリのアーティファクトとメタデータを使用し<project_dir>/target/repository
、ビルドが壊れます;-)
p2.inf を介して作成されたインストール可能なユニットが完全であるのに欠落して<project_dir>/target/repository/content.jar
いるよう<project_dir>/target/targetPlatformRepository/context.xml
です。たとえば、次のユニットは後者にのみ含まれます。
<unit id='configure.org.sample.bundle' ...>
<!-- config -->
</unit>
そのインストール可能なユニットも に含めるようにビルドを構成するにはどうすればよいproject/repository/content.jar
ですか?
これが私の p2.inf ファイルのスニペットです。
# org.sample.bundle
requires.0.namespace=org.eclipse.equinox.p2.iu
requires.0.name=configure.org.sample.bundle
requires.0.greedy=true
units.0.id=configure.org.sample.bundle
units.0.version=1.0.0
units.0.provides.1.namespace=org.eclipse.equinox.p2.iu
units.0.provides.1.name=configure.org.sample.bundle
units.0.provides.1.version=1.0.0
units.0.instructions.install=org.eclipse.equinox.p2.touchpoint.eclipse.installBundle(bundle:${artifact});
units.0.instructions.configure=org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel:2); org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started:true);
units.0.hostRequirements.1.namespace=osgi.bundle
units.0.hostRequirements.1.name=org.sample.bundle
units.0.hostRequirements.1.greedy=false
units.0.hostRequirements.2.namespace=org.eclipse.equinox.p2.eclipse.type
units.0.hostRequirements.2.name=bundle
units.0.hostRequirements.2.range=[1.0.0,2.0.0)
units.0.hostRequirements.2.greedy=false
units.0.requires.1.namespace=osgi.bundle
units.0.requires.1.name=org.sample.bundle
units.0.requires.1.greedy=false
そして Tycho ビルドからのエラー:
Cannot complete the install because one or more required items could not be found.
Software being installed: sample 1.0.0.201308060715 (sample.product 1.0.0.201308060715)
Missing requirement: Sample Feature 1.0.0.201308060715 (sample.feature.feature.group
1.0.0.201308060715) requires 'configure.org.sample.bundle 0.0.0' but it could not be found