How to install plugins in v3?


#1

I have been given a pointer to a plugin for Nexus that I’d like to try to use. It may not be usable. It may work. But I’m lost as to how to add it.

The plugin is at Maven Repository: org.sonatype.nexus.plugins » nexus-atlas-plugin » 2.14.13-01 and has a later v3 version (which is dated 2015). I’ve downloaded and add both plugins (one at a time to see if one of the would work) to the /opt/sonatype/nexus/system/org/sonatype/nexus/plugins/nexus-atlas-plugin/<version> folders. I can’t seem to see anything about them loading (or not loading) in the nexus.log.

I have Googled this issue for a while now and there are quite a few posts on v2 Nexus but not many in v3 (or confirming that it’s the steps yo do for v3 as you do for v2).

I’m kind of stuck. So two questions:

  1. Will this plugin work, is it for the correct version or should I forget it?
  2. In future, if I have to install a third party plugin for v3, how should I do it (I see a lot on the Sonatype Exchange but they mostly read like I should where to install it to)?

Any help at all appreciated.


#2

Hi Paul,

Plugins for Nexus Repo 2 are not compatible with Nexus Repo 3, so that plugin won’t work. I’m not aware of any plugin for Nexus Repo 3 that does something similar.

Rich


#3

Hi Rich,

Thanks for replying!

Can I ask how you know this is not compatible with version 3 (to be clear I’m not questioning you, I’m trying to see if there is an easy way to know for future)?

Can you also tell me how you would add a plugin to Nexus 3?

Thanks.

Paul


#4

If the plugin 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 org.sonatype.nexus.plugins:nexus-plugins 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 Repo.

Reference:


#5

Many many thanks for that Rich!