# Trying to build a custom plugin

**URL:** <https://community.sonatype.com/t/trying-to-build-a-custom-plugin/9291>\
**Category:** Sonatype Nexus Repository\
**Created:** [September 12, 2022, 2:34pm UTC](https://community.sonatype.com/t/trying-to-build-a-custom-plugin/9291 "2022-09-12T14:34:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![emil.thelin](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@emil.thelin](https://community.sonatype.com/u/emil.thelin)\
**Post date:** [September 12, 2022, 2:34pm UTC](https://community.sonatype.com/t/trying-to-build-a-custom-plugin/9291/1 "2022-09-12T14:34:51Z")

</div>

I’m new to nexus and this community so sorry if there are obvious things I’ve missed but I’m trying to build a custom plugin for a custom format (based on zypper).

I found this guide: [nexus-development-guides/format-plugin.md at master · sonatype-nexus-community/nexus-development-guides · GitHub](https://github.com/sonatype-nexus-community/nexus-development-guides/blob/master/docs/format-plugin.md) and have followed that without success: The plugin builds/deploys but never shows up in the nexus UI when I try to create a new repository.

I’ve also tried reverse engineering a couple of different plugins (raw, composer, etc) and I managed to get the plugin to at least show up in the UI but only the proxy-version is clickable.

So obviously I’m missing something here, I’ve googled like a maniac but haven’t found a good guide on how to write a plugin for nexus.

Am I missing something obvious? Is there any guides somewhere that might help me that I haven’t found?

Any help is very much appreciated!

Best regards

---

<div class="post-metadata">

**Author:** ![mpiggott](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mpiggott](https://community.sonatype.com/u/mpiggott)\
**Post date:** [September 12, 2022, 8:22pm UTC](https://community.sonatype.com/t/trying-to-build-a-custom-plugin/9291/2 "2022-09-12T20:22:44Z")

</div>

Probably your first step would be to narrow down where the problem is:

- figure out if your bundle is part of nexus (i.e. through bundles UI or logs)
- Check for logged errors during startup
- If your bundle is included and isn’t causing errors you probably need to do some sort of line-by-line comparison with public code.

---

<div class="post-metadata">

**Author:** ![emil.thelin](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@emil.thelin](https://community.sonatype.com/u/emil.thelin)\
**Post date:** [September 13, 2022, 7:06am UTC](https://community.sonatype.com/t/trying-to-build-a-custom-plugin/9291/3 "2022-09-13T07:06:04Z")

</div>

Yeah, the bundle is part of nexus. I can see in the logs the plugin being deployed and activated without errors.

Is there any bare bones plugin I could reverse engineer? Tried doing that with one of the bigger ones but without any success really

---

<div class="post-metadata">

**Author:** ![mmartz](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@mmartz](https://community.sonatype.com/u/mmartz)\
**Post date:** [September 13, 2022, 8:58pm UTC](https://community.sonatype.com/t/trying-to-build-a-custom-plugin/9291/4 "2022-09-13T20:58:18Z")

</div>

I don’t think that development guide covers adding to the UI. [See how the compose plugin adds itself to the UI via javascript code.](https://github.com/sonatype-nexus-community/nexus-repository-composer/tree/master/nexus-repository-composer/src/main/resources/static/rapture/NX/composer) There are three recipe files that declare the UI for the different repository types.

---

<div class="post-metadata">

**Author:** ![emil.thelin](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@emil.thelin](https://community.sonatype.com/u/emil.thelin)\
**Post date:** [September 14, 2022, 7:52am UTC](https://community.sonatype.com/t/trying-to-build-a-custom-plugin/9291/5 "2022-09-14T07:52:24Z")

</div>

You were completely right, after adding those and adding the extjs-maven-plugin to the pom-file I got it working, thank you very much @mmartz 🙂

---

<div class="post-metadata">

**Author:** ![mpiggott](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mpiggott](https://community.sonatype.com/u/mpiggott)\
**Post date:** [September 14, 2022, 6:18pm UTC](https://community.sonatype.com/t/trying-to-build-a-custom-plugin/9291/6 "2022-09-14T18:18:10Z")

</div>

There is also a maven archetype for generating a format plugin - [GitHub - sonatype-nexus-community/nexus-format-archetype: Archetype for creating Nexus format plugin](https://github.com/sonatype-nexus-community/nexus-format-archetype)
