Slicing and dicing the p2 way

We’ve traditionally used the packager to craft the features that are available on our download page from the signed bundles in our master feature. However, the packager isn’t very efficient because it unzips all of the input feature to the packaging process, regardless of the bundles that are actually needed. Also the packager can be confusing for new users to configure. The packager also doesn’t include metadata in the resultant zips. As my neighbour Pascal says, metadata matters. We’d like for people to reconsume the metadata that we create during the build instead of recreating it, possibly with errors.

In the M6, the p2.mirror task in the org.eclipse.equinox.p2.repository.tools bundle was introduced. This task provides a much more flexible and efficient mechanism for slicing and dicing bundles from a repo into a smaller repo. For instance, to assemble the components of the Equinox SDK from a repo, this command will do the trick:

This resulting content will include all the bundles associated with the org.eclipse.equinox.feature.group and org.eclipse.equinox.source.feature.group IU’s as referenced in the content.jar. The version of these IU’s is not specified which means that the highest version will be selected from the repo. Conversely, you could specify a version. The platformFilter=”true” means that all platform specific fragments associated with this iu will be provisioned.

A simple and fast slicer. For the low low price of $19.95. Wait, it’s free. Try it out today.

For more information, see

bug 262083

bug 265208

3 comments on “Slicing and dicing the p2 way

  1. Very cool! I hope the documentation in the SDK gets updated with this information!


  2. Just one question – there is p2 site with set of different platform specific fragments. Is it possible to set slicing options to mirror only several platforms?
    For example I need next set of platforms:
    win32, win32, x86 &
    linux, gtk, x86 &
    linux, motif, x86 &
    macosx, carbon, x86?


  3. krab-spb

    Yes, from the doc…use platformFilter

    platformFilter An “os,ws,arch” triplet to set as the platform against which IU LDAP filters will be matched. IUs not matching the filter will not be mirrored.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: