Reputation: 492
Within my application I deploy generated artifacts to a certain (hosted) Nexus repository. From another instance of my application I want to know all artifacts that have been deployed to that repository. I studied the Nexus REST API but couldn't find a way to get that information. Does anybody know how to get a list/set of all artifacts of a given Nexus repository via REST or any other API?
Upvotes: 3
Views: 6448
Reputation: 492
Maven-Indexer is exactly what I was looking for: https://github.com/apache/maven-indexer/blob/master/README.md
Upvotes: 1
Reputation: 78021
The best way to monitor artifacts deployed to a Nexus repository is to subscribe to the RSS feed:
http://books.sonatype.com/nexus-book/reference/using-sect-feeds.html
Upvotes: 2
Reputation: 3295
One method would be to note that Nexus simply provides a means to manage the integration of artifacts into a REST tree -- what we used to call a simple web server. In that manner, you can do what is effectively a scrape of the REST endpoint in the same manner that HTML content is scraped.
A better way is to download the indexes that are generated by Nexus and interpret them. Nexus Can't Download Remote Repo Index and Nexus - proxy repositories with no indexes? are references for what is going on with that method.
Upvotes: 1