Skip to main content

p2 Repositories

Introduction

Fundamentally, p2 is a technology for provisioning and managing Eclipse- and Equinox-based applications. You can use p2 to install or manage any aspect of your application, from the physical plugins and native code, to the configuration of the installed software: file permissions, command line arguments, etc. Installation with p2 does not consist simply in adding or removing files in the file system, but more generally the sequence of events that must occur to lay down and configure a system that is ready to run.

Note

This format is disabled by default in Nexus Repository Manager Pro HA-C environments.

Supported Features

  • Repository types - Proxy

  • Simple p2 plugin repositories

  • Composite p2 plugin repositories

  • Update sites

  • Features, Plugins, Binary types of files

  • Eclipse IDE version 4.2.2 or later (support for earlier versions is not guaranteed)

Warning

Auto blocking unreachable remote repositories is disabled by default due to connection problems.

Proxying p2 Repositories

You can set up a p2 proxy repository to access a remote repository location, for example to proxy the Eclipse Foundation repository.

To proxy a p2 repository, you simply create a new p2 (proxy) as documented in Repository Management in details. Minimal configuration steps are:

  • Define Name - e.g. p2-proxy

  • Define URL for Remote storage - e.g.http://download.eclipse.org/releases/2019-09

  • Select an appropriateBlob store

Browsing p2 Repositories and Searching Packages

You can browse p2 repositories in the user interface inspecting the components and assets and their details, as described in Browsing Repositories and Repository Groups.

Searching for p2 packages can be performed in the user interface, too. It finds all packages that are currently stored in the repository manager, as described in Searching for Components.

Configuring the Eclipse IDE to use Nexus Repository

All p2 plugins are possible to install via Help → Install new software.

Warning

Please uncheck checkbox 'Contact all update sites during install to find required software' for installing directly from NXRM.

42074469.png

Click Add button to add plugin source and put in the URL field the NXRM proxy repository URL (e.g. http://localhost:8081/repository/p2-proxy/).

Click Manage button if you want to manage your sources. There are some Eclipse sources here by default, you can disable them if you need just NXRM sources (deleting these resources will not lead to the desired result, they will appear again after the application is restarted).

42074470.png

Plugins Install

Select plugins

42074472.png

Follow the instructions. After installation Nexus Repository Manager contains proxied packages, as shown:

43352067.png