14

Where can I find some more details on what is contained in a Maven repository's Maven Index? Where can one find more details on how this all works? I am somewhat familiar with the maven-indexer, but I still have some grey spots...

What is the difference between the unpacked and packed indexes?

Does a Maven proxy repository have just the remote's index, or does it also keep an index of what artifacts it currently has cached locally?

A thorough and sufficiently lengthy reply would be highly appreciated, as I'm researching the topic and there's, unfortunately, little documentation about it.

4

1 回答 1

13

这里有很多关于它的信息,还有一些更书呆子的细节:Nexus Indexer 2.0:增量下载

要开始回答您的问题,nexus-maven-repository-index.gz 包含存储库的所有内容。以 Central 为例,这将是 Central 中的一切。除此索引外,还会生成一个增量索引,其中包含自上次运行索引以来的所有更改。这些列表存储在 nexus-maven-repository-index.properties 中。这些增量索引在那里,因此不需要一直下载完整索引。

未打包索引用于搜索/浏览远程功能,打包索引用于从远程传输到代理/工具。

如果主要用于浏览远程资源,Maven 代理存储库可以下载远程索引。这发生在 Nexus Repository 2 中,但不在 3 中。在 3 中,下载了索引,开发工具可以使用它来探索远程内容,最大的区别是我们不使用它来填充 Nexus Repository 本身内部的任何内容. 如果可用,Maven 的搜索将针对远程索引运行,然后是本地索引。

Nexus Repository Manager 中的代理保留自己的索引,如果远程索引存在,将下载它。本地将包含本地的内容,远程将包含远程的内容。

gz 文件只是存储 lucene 索引内容以供传输的一种方式,在检索时将其解包并放入本地 lucene 索引中。内容不是实际的 lucene 索引,只是内容,以防止将来的 lucene 版本更新。

当您在 Nexus Repository Manager 中运行某些任务时会生成打包索引,例如发布索引。这将根据您确定的任何时间表运行。

对于组存储库,将从所有成员索引创建一个索引,如果可用,它将包括远程索引,否则我们知道的所有本地索引。

无论存储库类型如何,在进行搜索时都会检查 lucene 索引。

一些关于索引器的额外博客文章:

于 2017-01-06T17:56:59.043 回答