Why do I see folders in a group repository when folder has been removed from underlying Repository

Nexus Repository Manager caches the maven-metadata.xml files in group repository storage (this is specifically for maven2 type group repositories).

The reason this is done, is so that it does not have to build the group level maven-metadata.xml files twice. If the checksums were not cached, it would have to build these when the maven-metadata.xml files are requested, and then again when the maven-metadata.xml.sha1 files are requested.

When folders/files are removed from the underlying repositories, you may still see the folder containing maven-metadata.xml.md5 and maven-metadata.xml.sha1 files when browsing storage on the group repository.

Unfortunately there is not any mechanism in Nexus Repository Manager to remove these files. This generally is not a problem because they are very small. But it will make folders appear where these are the only files available.

You can safely remove these files from the group repository's local storage ("sonatype-work/nexus/storage/<group-repo-id>"). If any are still needed they will be regenerated then next time a maven-metadata.xml file is requested through the group.

Nexus Repository Manager 3 implements the group repositories in a different way, and it will not have this issue.

Have more questions? Submit a request


Article is closed for comments.