Using P2 Repositories with Bndtools

Bndtools support multiple types of repositories to grep artifacts from. For a while now P2 Repositories are supported as well, but information on how to add them are sparse and it is not obvious if you are new to bnd.

What to do:

Open the build.bnd in the cnf Project and switch to the source view. To add a repository add an entry like this:

-plugin.3.mars: \
 aQute.bnd.repository.p2.provider.P2Repository; \
 url = http://download.eclipse.org/releases/mars; \
 name = mars

My colleague urged me to give the following WARNING after he tried it himself: This example will cause bndtools do download the whole repository with all the content. Thus this may take a while!

We hope this might be helpful to you as well.

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s