1

I want to get all the artifact names on a particular group name in my nexus repository.

I have tried lucene web api for this. like i used a url like, http://localhost:8080/nexus/service/local/lucene/search?g=my.group.name

But on the xml response I see the it is listed the artifact from index section, which contains the deleted artifacts also. I don't want the deleted artifact names.

How can I achieve this. Is there any we api supports this?

ѕтƒ
  • 3,547
  • 10
  • 47
  • 78
  • What do you mean by "deleted artifacts"? Did you update the index before you searched? If you have access to the underlying file system, you can solve your problem by searching through the directory. – J Fabian Meier Oct 26 '16 at 13:45

1 Answers1

0

You can write a small plugin to retrieve the GAV's. The "crawling" example from this location does pretty much what you need already:

https://github.com/sonatype/nexus-example-plugins/

The ArtifactDiscoveryListener.java is called for every GAV in a repository. The plugin contributes a scheduled task, so it's easy to run.

You can find more information about developing plugins here:

https://books.sonatype.com/nexus-book/reference/plugdev.html

DarthHater
  • 3,222
  • 25
  • 26