How can I generate an XML catalog from my remote Nexus Maven repository?

387 views Asked by At

My company hosts its own Maven repository using Sonatype Nexus. Many of the hosted artifacts were published without using the archetype plugin, and thus are not included in the archetype-catalog.xml file. Is there a way, either through a Maven command or some feature of Sonatype's software, to generate an XML that describes the content of the repository? Re-publishing everything would be a huge undertaking.

1

There are 1 answers

1
333kenshin On BEST ANSWER

@CAustin,

The Sonatype guide to Nexus backups is probably your best reference. Money quote:

Luckily, Nexus was designed to use the filesystem to store both configuration and repository data.   This means that backing up your Nexus installation is as easy as configuring an automated backup tool such as amanda or a simple backup script that uses rsync.   There is no database to export or server to suspend for the duration of the backup.  Backing up or restoring a Nexus installation is as easy as copying a set of files.

So simply run find command in sonatype-work/nexus/storage/ directory, e.g.

$ find sonatype-work/nexus/ -type f -name pom.xml

Hope that helps.