Nexus 3 plugin API examples

447 views
Skip to first unread message

Andrew Craft

unread,
Sep 26, 2016, 12:13:11 PM9/26/16
to Nexus Users
hi

I'm trying to  create a plugin similar to the 'VirusScanner' in the examples repo https://github.com/sonatype/nexus-example-plugins/tree/master/virusscan. The examples are not updated to nexus 3 yet and i'm struggling to follow the examples from https://books.sonatype.com/nexus-book/3.0/reference/bundle-development.htm which talk about new repository formats etc. 

Ultimately i need to be able to hook into every proxied repo request for a component/asset and then apply logic (calling out to various internal audit systems) and either block or allow to continue the request. Can someone provide some pointers to get started, is the API documented anywhere to see where to get started in terms of extension points?

thanks
Andrew

Andrew Craft

unread,
Sep 27, 2016, 11:46:55 AM9/27/16
to Nexus Users
I've registered a custom feature but its unclear what facet or interface  i need to implement to hook into the request and how to register for different repositories. Any pointers would be gratefully received.

Jeffry Hesse

unread,
Sep 27, 2016, 1:02:20 PM9/27/16
to Andrew Craft, Nexus Users
Hi there,

The calls for all proxies originate out of org.sonatype.nexus.repository.proxy, are extended in each format to be specific, and a lot is implemented here at the most base level:
components/nexus-repository/src/main/java/org/sonatype/nexus/repository/proxy/ProxyFacetSupport.java

Our API is not documented yet, and the area I pointed you at is essentially internals so they could be subject to change over time. 

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/7aeb9abf-4f44-4539-a7ad-6f8aabc528e8%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.

Brian Fox

unread,
Sep 27, 2016, 1:04:19 PM9/27/16
to Jeffry Hesse, Andrew Craft, Nexus Users
3.1 is also adding event hooks that would allow you to do this externally as well. 

On Tue, Sep 27, 2016 at 10:02 AM, Jeffry Hesse <jhe...@sonatype.com> wrote:
Hi there,

The calls for all proxies originate out of org.sonatype.nexus.repository.proxy, are extended in each format to be specific, and a lot is implemented here at the most base level:
components/nexus-repository/src/main/java/org/sonatype/nexus/repository/proxy/ProxyFacetSupport.java

Our API is not documented yet, and the area I pointed you at is essentially internals so they could be subject to change over time. 
On Mon, Sep 26, 2016 at 12:13 PM Andrew Craft <amcr...@gmail.com> wrote:
hi

I'm trying to  create a plugin similar to the 'VirusScanner' in the examples repo https://github.com/sonatype/nexus-example-plugins/tree/master/virusscan. The examples are not updated to nexus 3 yet and i'm struggling to follow the examples from https://books.sonatype.com/nexus-book/3.0/reference/bundle-development.htm which talk about new repository formats etc. 

Ultimately i need to be able to hook into every proxied repo request for a component/asset and then apply logic (calling out to various internal audit systems) and either block or allow to continue the request. Can someone provide some pointers to get started, is the API documented anywhere to see where to get started in terms of extension points?

thanks
Andrew

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.

To post to this group, send email to nexus...@glists.sonatype.com.
Reply all
Reply to author
Forward
0 new messages