如何让 Nexus 中的快照出现在 m2eclipse 依赖项搜索中?
这个周末我一直在研究 Nexus 指南我已经完成了所有设置,现在我可以将快照发布到本地 Nexus 安装了。
我似乎无法弄清楚如何让 m2eclipse 查看快照并将其作为“添加依赖项”搜索面板中的选项提供。我该怎么做?谢谢!
如果有任何用处,我的settings.xml如下:
<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">
<localRepository />
<interactiveMode />
<usePluginRegistry />
<offline />
<pluginGroups />
<servers>
<server>
<id>localSnap</id>
<username>deployment</username>
<password>*****</password>
</server>
</servers>
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://localhost:8080/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<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>
<!--make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
I've been working through the Nexus guide this weekend and I've got everything set up, to the point that I can publish a snapshot to my local nexus install.
I can't seem to work out how to get m2eclipse to see the snapshot and offer it as an option in the Add Dependencies search panel. How do I do that? Thanks!
In case it's of any use, my settings.xml is as follows:
<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">
<localRepository />
<interactiveMode />
<usePluginRegistry />
<offline />
<pluginGroups />
<servers>
<server>
<id>localSnap</id>
<username>deployment</username>
<password>*****</password>
</server>
</servers>
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://localhost:8080/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<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>
<!--make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我现在有了答案。您必须设置 Nexus 才能发布索引。 http://www.sonatype.com/people/2009/09/ nexus-scheduled-tasks ...设置计划任务,为 m2eclipse 等客户端发布索引。但您必须等到 nexus 的计划任务部分出现 WAITING 状态。 eclipse重启后就应该可以工作了。问候,Jakub
顺便说一句:您的代理存储库必须具有“下载远程索引 - true”并且 nexus 必须能够搜索远程索引......但我想您知道这一点
I have the answer now. you have to set up nexus to publish the index. http://www.sonatype.com/people/2009/09/nexus-scheduled-tasks ...Set up the schedule task to publish the index for clients like m2eclipse. But you must wait until WAITING status appears at the scheduled task section in nexus. After eclipse restart it must work. Regards, Jakub
BTW: your proxied repositories must have "Download Remote Indexes - true" and nexus must be able to search through remote indexes... but I supposed you know that