配置到 Nexus 时,m2eclipse 插件搜索没有给出结果
我将 Nexus 配置为代理公共存储库。依赖项搜索效果很好,但是当我尝试搜索插件(例如“maven-compiler-plugin”)时,它给出 0 个结果。 Nexus 中的索引没问题,并且那里存在插件工件。
有人可以告诉我如何配置它才能接收插件搜索结果吗?
这是我的设置:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://localhost:8080/content/groups/public</url>
</mirror>
</mirrors>
<servers>
<server>
<id>releases</id>
<username>user</username>
<password>password</password>
</server>
<server>
<id>snapshots</id>
<username>user</username>
<password>password</password>
</server>
<server>
<id>thirdparty</id>
<username>user</username>
<password>password</password>
</server>
<server>
<id>nexus</id>
<username>user</username>
<password>password</password>
</server>
</servers>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
提前致谢!
I configured Nexus to proxy for public repositories. Dependencies search works good but when I try to search plugin, e.g. "maven-compiler-plugin", it gives 0 results. Indexes are ok in Nexus and plugin artifact exists there.
Could someone please tell me how to configure it to be able to receive plugin search results?
Here are my settings:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://localhost:8080/content/groups/public</url>
</mirror>
</mirrors>
<servers>
<server>
<id>releases</id>
<username>user</username>
<password>password</password>
</server>
<server>
<id>snapshots</id>
<username>user</username>
<password>password</password>
</server>
<server>
<id>thirdparty</id>
<username>user</username>
<password>password</password>
</server>
<server>
<id>nexus</id>
<username>user</username>
<password>password</password>
</server>
</servers>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有类似的问题。虽然我还没有自己解决,但以下两个提示可能会有所帮助:
请查看以下链接的“发布索引”部分:
http://www.sonatype.com/books /nexus-book/reference/confignx-sect-managing-tasks.html
从文档来看,配置 Nexus 来发布索引(例如在“所有存储库”上)应该可以解决问题。设置后,您将需要手动运行计划任务,以便它直接执行。 m2eclipse/m2e 中也可能有缓存。
我不相信它能正常工作,但我在 Nexus 从代理存储库下载索引时遇到了其他问题。这可能是您遇到的问题的一部分,因此请查看此处的“下载远程索引”部分:http://www.sonatype.com/books/nexus-book/reference/confignx-sect-manage-repo.html
I'm having a similar issue. Whilst I haven't solved for myself, the following two pointers may help:
Take a look at the "Publish Indexes" section of the following link:
http://www.sonatype.com/books/nexus-book/reference/confignx-sect-managing-tasks.html
From the documentation, it looks like configuring Nexus to publish indexes (e.g. on "All repositories") should do the trick. You will want to run the scheduled task manually once set up so that it does it directly. There may also be caching in m2eclipse/m2e.
I'm not convinced it's working, but I'm having additional issues with Nexus downloading indexes from proxied repositories. This may be part of the issue you're seeing, so take a look at the "Download Remote Indexes" section here: http://www.sonatype.com/books/nexus-book/reference/confignx-sect-manage-repo.html