Skip to main content

Installing Bundles

In order to have your features from your bundle available as part of the repository manager, the bundle needs to be loaded by the OSGi container.

The default build assembles multiple bundles into features that form the foundation of Nexus Repository Manager OSS and Nexus Repository Manager Pro. A number of these definitions can be found in the assemblies module. The supported distributions are defined in the modules nexus-oss-feature and nexus-pro-feature, which are part of the internal code-base.

Installing Bundles Into 3.15.0 and Later

If the plugin bundle has been built as a KAR file you can just drop the file into $install-dir/deploy and it will be automatically unpacked and deployed. KAR files are like the old “plugin bundles” in Nexus Repo 2, they contain the plugin jar as well as its dependencies and a feature file that describes the plugin.

Assuming the plugin project uses as its parent then you can use the buildKar Maven profile when building the plugin to make a deployable KAR file.

mvn -PbuildKar clean install

Note that KAR file support was added in version 3.15.0 of Nexus Repository.

Installing Bundles Into 3.14.0 and Earlier

if you're using a Nexus Repo 3.14.0 or ealier, or the plugin is not availalbe in KAR format, use this procedure.

An installation of the repository manager defines the feature it loads in $data-dir/etc/ and additional features can be declared to be loaded there. E.g. to add my-custom-feature to an Nexus Repository Manager OSS installation you can change to:


The feature my-custom-feature is a Maven project that includes the desired bundles as dependencies. Alternatively you can add a specific feature via Karaf commands.

Bundles can be loaded via the Karaf console. To enable the console, set karaf.startLocalConsole in bin/nexus.vmoptions to true. This allows you to access the Karaf console by pressing enter after starting the repository manager with the run option.

The bundle:install command can be used to load a bundle into the container.

For development usage, you can set the local Maven repository as the source for any bundle loading with e.g.

config:property-set -p org.ops4j.pax.url.mvn
org.ops4j.pax.url.mvn.defaultRepositories "file:${user.home}/.m2/repository@id=system.repository@snapshots"

Once your bundle is installed, it will be displayed as part of the output from bundle:list. With the local Maven repository configured as a source, you can rebuild your bundle and get it reloaded and the repository completed restarted with:

bundle:update 270
system:shutdown -f -r

This process ensures that bundles are updated, imports are correctly picking up any changes and the full repository manager runs through the full start-up life-cycle.