How can I write a custom staging rule in Nexus Repo 2 Pro?

Developing a custom staging rule is possible, provided you have a valid Nexus Professional license.

First follow the steps for Accessing Sonatype Nexus Private Development Repository.

Then, check out the branch of the nexus example plugins project that matches your version of Nexus.

Finally, build the resulting project using "mvn clean install".  When it is complete you will find the staging rule bundle (a zip file) in the nexus-example-plugins/pro-plugins/stagingrules/target directory.  Unzip this into sonatype-work/nexus/plugin-repository, and restart the server.  The new custom staging rule will be available.

Have more questions? Submit a request

6 Comments

  • 0
    Avatar
    Richard Duncan

    Hi Rich - I was looking at this and I'm not sure that the group in the above URL is public.  when I go to the URL it wants authentication info.

  • 0
    Avatar
    Rich Seddon

    It's not public, it's restricted to our paid customers.  If you enter your support account credentials you should be able to access it.

    Rich

  • 0
    Avatar
    Grégory Joseph

    Hey Rich, any chance you could share the URL of *just* the repository, so as to avoid mirroring the whole group (which has stuff we're already mirroring elsewhere)

  • 0
    Avatar
    Rich Seddon

    Unfortunately it isn't just one repository, there are quite a few dependencies outside of Nexus Pro that are also needed.

  • 0
    Avatar
    Grégory Joseph

    Perhaps I can find those elsewhere, and/or apply routing to enable those I end up needing for my little plugin ?

  • 0
    Avatar
    Peter Lynch

    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.

Article is closed for comments.