ビルドの準備ができたら、さまざまなプラットフォームのすべてのビルド アーカイブに p2 フォルダーがあります。私が理解しているように、ビルド段階でアーカイブから p2 ディレクトリを除外することは不可能です。そのため、アーカイブ製品の実行を使用する代わりに、自分でアーカイブをパックしてみます。問題は、他のプラットフォームまたはアーキテクチャのアーカイブを作成したい場合、pom を変更する必要があることです。今、私は次のビルドスキーマを持っています:
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>materialize-products</id>
<goals>
<goal>materialize-products</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>pack-zip-files</id>
<phase>package</phase>
<configuration>
<target>
<zip basedir="${project.build.directory}/products/xxx/win32/win32/x86"
destfile="${project.build.directory}/products/xxx-1.0.${BUILD_NUMBER}-win32.win32.x86.zip"
excludes="${exclude_p2}" />
<zip basedir="${project.build.directory}/products/xxx/linux/gtk/x86"
destfile="${project.build.directory}/products/xxx-1.0.${BUILD_NUMBER}-linux.gtk.x86.zip"
excludes="${exclude_p2}" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
問題は、すべての zip ファイルから p2 フォルダーを削除する方法です。