Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Tycho/Pack200"
Line 5: | Line 5: | ||
== Pack200 only == | == Pack200 only == | ||
− | Add plugin execution '''pack200b:pack''' on your eclipse-plugin and eclipse-feature to enable pack200 for them | + | Add plugin execution '''pack200b:pack''' on your eclipse-plugin and eclipse-feature to enable pack200 for them. In order to get your bundles generate their pack200'ed artifacts as well as regular jar, just add this to your pom: |
+ | |||
+ | <source lang="xml"> | ||
+ | <plugin> | ||
+ | <groupId>org.eclipse.tycho.extras</groupId> | ||
+ | <artifactId>tycho-pack200b-plugin</artifactId> | ||
+ | <version>${tychoExtrasVersion}</version> | ||
+ | <executions> | ||
+ | <execution> | ||
+ | <id>pack200-pack</id> | ||
+ | <goals> | ||
+ | <goal>pack</goal> | ||
+ | </goals> | ||
+ | </execution> | ||
+ | </executions> | ||
+ | </plugin> | ||
+ | </source> | ||
== Pack200 and Signing == | == Pack200 and Signing == | ||
− | Pack200 is most commonly used together with jar singing and requires | + | Pack200 is most commonly used together with jar singing and requires separate "normalization" phase . Because there are at least two ways to sign jars and because maven does not allow interleaving mojos from the same plugin with mojos from different plugins within the same build phase, it was necessary to split pack200 normalize and pack functionality between two separate maven plugins. The relevant part of build lifecycle looks like this: |
− | separate "normalization" phase | + | # pack200a:normalize |
− | are at least two ways to sign jars and because maven does not allow | + | # sign |
− | interleaving mojos from the same plugin with mojos from different | + | # pack200b:pack |
− | plugins within the same build phase, it was necessary to split pack200 | + | |
− | normalize and pack functionality between two separate maven plugins. The | + | |
− | relevant part of build lifecycle looks like this | + | |
+ | == Hoe to set up your eclipse-repository to consume them ? == | ||
− | + | ''eclipse-repository'' packaging type will automatically include packed artifacts (as well as regular jars) if they are available in the target-platform. To make target-platform, and then eclipse-repository, using .pack.gz stuff, you simply have to set the ''includePackedArtifacts'' parameter to true in your target-platform-configuration-plugin. | |
− | + | ||
− | + | ||
+ | <source lang="xml"> | ||
+ | <plugin> | ||
+ | <groupId>org.eclipse.tycho</groupId> | ||
+ | <artifactId>target-platform-configuration</artifactId> | ||
+ | <version>${tychoVersion}</version> | ||
+ | <configuration> | ||
+ | <includePackedArtifacts>true</includePackedArtifacts> | ||
+ | </configuration> | ||
+ | </plugin> | ||
+ | </source> | ||
− | + | Note that deprecated ''eclipse-update-site'' doesn't consider packed artifacts. | |
− | + | ||
− | + | ||
[[Category:Tycho|Pack200]] | [[Category:Tycho|Pack200]] |
Revision as of 06:15, 18 December 2012
Contents
Purpose and Generalities
Pack200 is a compression dedicated to Jar files that is recommended to use in eclipse p2 repositories. More details are available at http://docs.oracle.com/javase/1.5.0/docs/guide/deployment/deployment-guide/pack200.html and Pack200
Pack200 only
Add plugin execution pack200b:pack on your eclipse-plugin and eclipse-feature to enable pack200 for them. In order to get your bundles generate their pack200'ed artifacts as well as regular jar, just add this to your pom:
<plugin> <groupId>org.eclipse.tycho.extras</groupId> <artifactId>tycho-pack200b-plugin</artifactId> <version>${tychoExtrasVersion}</version> <executions> <execution> <id>pack200-pack</id> <goals> <goal>pack</goal> </goals> </execution> </executions> </plugin>
Pack200 and Signing
Pack200 is most commonly used together with jar singing and requires separate "normalization" phase . Because there are at least two ways to sign jars and because maven does not allow interleaving mojos from the same plugin with mojos from different plugins within the same build phase, it was necessary to split pack200 normalize and pack functionality between two separate maven plugins. The relevant part of build lifecycle looks like this:
- pack200a:normalize
- sign
- pack200b:pack
Hoe to set up your eclipse-repository to consume them ?
eclipse-repository packaging type will automatically include packed artifacts (as well as regular jars) if they are available in the target-platform. To make target-platform, and then eclipse-repository, using .pack.gz stuff, you simply have to set the includePackedArtifacts parameter to true in your target-platform-configuration-plugin.
<plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> <version>${tychoVersion}</version> <configuration> <includePackedArtifacts>true</includePackedArtifacts> </configuration> </plugin>
Note that deprecated eclipse-update-site doesn't consider packed artifacts.