Maven Nexus专用存储库访问
我刚刚在本地网络中设置了一个nexus存储库。此存储库公开了对Maven中央存储库的访问,以及三种不同的私有托管存储库:快照、发布和ext3rdparty。所有这些存储库都是nexus中公共组的一部分,我将其用作所有存储库的中心访问点: 我的问题是:使用NetBeans作为开发环境,我可以访问除ext3rdparty之外的所有存储库。i、 e.当我试图构建基于ext3rdparty repo中存储的库的项目时,我遇到了一个编译错误,而NetBeans无法找到/导航此存储库中的任何可用工件 我怀疑这是settings.xml/pom.xml问题,而不是NetBeans问题,因为正如我所说,我可以访问我在其他存储库中发布的工件,但我无法找出问题所在 以下是my settings.xml的完整内容,用于将maven重定向到我自己的存储库:Maven Nexus专用存储库访问,maven,maven-2,repository,nexus,Maven,Maven 2,Repository,Nexus,我刚刚在本地网络中设置了一个nexus存储库。此存储库公开了对Maven中央存储库的访问,以及三种不同的私有托管存储库:快照、发布和ext3rdparty。所有这些存储库都是nexus中公共组的一部分,我将其用作所有存储库的中心访问点: 我的问题是:使用NetBeans作为开发环境,我可以访问除ext3rdparty之外的所有存储库。i、 e.当我试图构建基于ext3rdparty repo中存储的库的项目时,我遇到了一个编译错误,而NetBeans无法找到/导航此存储库中的任何可用工件 我怀
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://nexus.server/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
<servers>
<server>
<id>nexus</id>
<username>user</username>
<password>***</password>
</server>
<server>
<id>releases</id>
<username>user</username>
<password>***</password>
</server>
<server>
<id>snapshots</id>
<username>user</username>
<password>***</password>
</server>
</servers>
关系
*
http://nexus.server/nexus/content/groups/public
关系
中心的
http://central
真的
总是
真的
总是
中心的
http://central
真的
总是
真的
总是
关系
关系
用户
***
释放
用户
***
快照
用户
***
下面是我的父pom中与存储库相关的部分,以允许部署:
<distributionManagement>
<repository>
<id>releases</id>
<name>Releases</name>
<url>http://nexus.server/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>Snapshots</name>
<url>http://nexus.server/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
释放
释放
http://nexus.server/nexus/content/repositories/releases/
快照
快照
http://nexus.server/nexus/content/repositories/snapshots/
你知道怎么了吗
提前谢谢
编辑:
损失了半天:我终于从ext3rdparty存储库中删除了所有依赖项,再次将它们上载到存储库,并更新了所有索引,现在一切都正常了
我真的不知道这里出了什么问题,但至少pom和设置还可以。感谢您的帮助。如果您遇到此类问题,可以右键单击“存储库”列表中受影响的存储库,激活修复索引或更新索引,然后在系统提要中检查系统更新的状态 您是否将第三方回购协议添加到您的公共组中
您是否尝试过从命令行使用Maven构建?它是否以与NetBeans相同的方式失败?如果您使用以下凭据登录到nexus:nexus user***您是否看到第三方存储库?可能该回购协议的权限不正确?这也可能是nexus配置问题。您能否通过浏览器访问
ext3rdparty
repository的内容?从命令行构建Maven时也会遇到同样的问题(NetBeans就是这么做的)。是的,我可以通过浏览器访问nexus的内容。我目前正在查看代理存储库,但我不明白为什么我可以访问中央存储库而不能访问第三方存储库,第三方应该是公共组的一部分……是的,权限没有问题