Sebastian Lang
Sebastian Lang

Reputation: 492

List of all artifacts from Nexus repository

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

Answers (3)

Sebastian Lang
Sebastian Lang

Reputation: 492

Maven-Indexer is exactly what I was looking for: https://github.com/apache/maven-indexer/blob/master/README.md

Upvotes: 1

Mark O'Connor
Mark O'Connor

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

Brian Topping
Brian Topping

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

Related Questions