maven-2 - 无法通过 Nexus 代理到 Maven 仓库

标签 maven-2 proxy repository nexus

我正在使用 Nexus 免费添加 (1.3.6) 并且我正在尝试添加一个代理存储库,如 Nexus 书 - Google Caja 中所述:http://google-caja.googlecode.com/svn/maven .

添加新的代理存储库并配置远程位置后,我尝试重新索引存储库,但无法看到相关的工件。

有没有人能够通过 Nexus 代理远程存储库并查看其工件?

罗南。

最佳答案

好吧,根据有关 Remote Index Downloads 的 Nexus 文档:

Nexus ships with three important proxy repositories for the Central Maven Repository, Apache Snapshot Repository, and the Codehaus Snapshot Repository. Each of these repositories contains thousands (or tens of thousands) of artifacts and it would be impractical to download the entire contents of each. To that end, most repositories maintain a Lucene index which catalogs the entire contents and provides for fast and efficient searching. Nexus uses these remote indexes to search for artifacts, but we've disabled the index download as a default setting. To download remote indexes,

  1. Click on Repositories under the Administration menu and change Download Remote Indexes to true for the three proxy repositories. You'll need to load the dialog shown in Figure 5.9, “Repository Configuration Screen for a Proxy Repository” for each of the three repositories.

  2. Right-click on each proxy repository and select Re-index. This will trigger Nexus to download the remote index files.

It might take Nexus a few minutes to download the entire index, but once you have it, you'll be able to search the entire contents of the Maven repository.

Once you've enabled remote index downloads, you still won't be able to browse the complete contents of a remote repository. Downloading the remote index allows you to search for artifacts in a repository, but until you download those artifacts from the remote repository they will not show in the repository tree when you are browsing a repository. When browsing a repository, you will only be shown artifacts which have been downloaded from the remote repository.



因此,对我来说,代理远程存储库必须提供 Nexus 索引(Google Caja 的存储库似乎不是这种情况)以允许 搜索 并且搜索不同于浏览 (即,您仍然需要下载工件才能在浏览存储库时查看它们)。话虽如此,不提供索引并不意味着没有代理 caja 存储库。

关于maven-2 - 无法通过 Nexus 代理到 Maven 仓库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1709790/

相关文章:

java - 如何使用 Maven 创建具有依赖项的可执行/可运行 JAR?

java - 使用 AOP 作用域代理在单例 bean 中 Autowiring 原型(prototype) bean

jpa - Kotlin 使用 SpringData Jpa 自定义仓库

maven-2 - Maven 过滤资源并添加项目版本

Java地铁安全: StreamMessage has been already consumed

java - Maven 构建环境中的 Atomikos + Jetty - 类加载器问题?

webpack - 如何在 Webpack Dev Server 热重载中从 URL 中删除端口?

c# - 通过 ping 或 socket 检查代理有什么区别?

java - 如何分离存储库和服务层

java - 如何从 Spring Data JPA GROUP BY 查询返回对象列表而不是对象数组