How to build Nexus OSS?

I have made changes to Nexus OSS (GitHub - sonatype/nexus-public: Sonatype Nexus Repository Manager; Open-source codebase mirror) and I would like to build and create a tar.gz distribution package (as you - Sonatype - provide on your webpage).
According to README I should use

./mvnw clean install

But this creates a basic package. I would like to create a full package. Can you guide me on how to do it?
I need that fix on our production, which is currently running version 3.27. And looking at your GitHub repo(Pull requests · sonatype/nexus-public · GitHub - now 24 other PR hanging…), I don’t know how long I will wait for merging my code to the main branch…

Thanks!

hello @mareksierocinski, you are correct that the build from the nexus-public repo does not generate the same binaries that we provide to download. We have worked to open source as much support for formats as we can. However, as it stands today, what we provide to download includes some closed source components (we provide them for free, as in beer, without a paid license - however this setup also makes it time-consuming to pull in PRs that come in from nexus-public. We are working to improve all of this, but it will take us a while before we have something in place that will be noticeably better).

I can see how this makes it a pain to incorporate a custom change. The only approach I can think of that would work for your situation would be to take the jar that you’ve customized and replace it in the downloaded distribution. Hopefully your customization is in a single module, such as nexus-repository-npm [I’m guessing based on your other post]. This means you could simply untar/gzip the official distribution, overwrite the nexus-repository-npm jar with yours, then run it.

2 Likes

Thanks @wwannemacher! I can confirm that this slolution worked. To be honest, I thought about something simmilar, but your answer put me on the right tracks. In my particulat case, I needed to replace nexus-repository-npm and nexus-repository-services. It works!

1 Like