Visit my.sonatype.com for documentation on Nexus Repository version 2.
Example Plugins Using UI
The source code of nexus-oss is the best source of current techniques. Use the branch relevant for your version of Nexus Repository.
Upgrading Plugin UI from Nexus Repository 2.7.x to 2.8.x+
The Atlas Plugin should be a good example of a modern plugin.
Make an implementation:
Then add resources in a pattern similar to:
See:
An example changeset of converting a Nexus Repository 2.7.x plugin to support Nexus Repository 2.8 and 2.9 is here:
What about Nexus Repository Future (3.x)?
The UI has changed dramatically in Nexus Repository 3 and we have examples on how to build UI plugins in the documentation.
4 Comments
I tried to follow the 2.8 path. Unfortunately I am not able to find any way how to add the resources to index.html page. The files are accessible by their url (e.g. http://localhost:8081/nexus/static/js/nexus-gtm-plugin-boot.js), but the Javascript is never called. The Tycho plugin has it the same way and also does not call its js file.
I thought I will see something like
bootModules.push('nexus-capabilities-plugin-boot');
deps.push('css!static/css/nexus-atlas-plugin-all.css?v=2.9.0-04');
deps.push('static/js/nexus-atlas-plugin-all.js?v=2.9.0-04');
In the source code, but it is not there. I suppose I need to somehow tell Nexus to make the plugin "required" but I was not able to find a way how to do it. Any thoughts? Thank you for your response.
David,
First make sure your plugin is loading properly using the plugin console or nexus.log.
It also important to have your pom.xml setup correctly with nexus plugin bundle plugin execution.
And of course the contents and name of the js file in the plugin src/main/resources directory should match the artifactid + "-boot".
If you are still stuck, submit your plugin project to https://support.sonatype.com and we'll try to help.
I contacted Sonatype support as suggested by Peter and they found the error in my code (the same error has the Tycho unzip plugin). My problem was a dependency in pom.xml:
<dependency>
<groupId>org.sonatype.nexus.plugins</groupId>
<artifactId>nexus-ui-extjs3-plugin</artifactId>
<scope>provided</scope>
<type>${nexus-plugin.type}</type>
</dependency>
The bold line was missing.
We are closing this article for comments.
If you have a support license, please contact us by submitting a support ticket.
If you do not have a support license, please use our Nexus Users List or our other free support resources.