在我的Nexus中,我自己的项目位于托管库“Snapshots”下。我必须将此存储库分配给“公共存储库”;否则,我不能用mvn编译我自己的项目。这将是错误消息:不想让我自己的Nexus上的工件公开
[ERROR] Failed to execute goal on project bword: Could not resolve dependencies for project com.bbword.core:bword:war:0.0.1-SNAPSHOT: Could not find artifact com.bbword.core:tts-app:jar:0.0.1-SNAPSHOT in nexus (http://www.bbword.com:8081/nexus/content/groups/public) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
当然,我不希望在互联网上的公开信息库我自己的项目。我可能会错哪个配置?
这是我的settings.xml:
<?xml version="1.0"?>
<settings>
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://www.bbword.com:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
<servers>
<server>
<id>nexus</id>
<username>admin</username>
<password>bbword</password>
</server>
</servers>
<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>
我的项目是在“快照”下。
修改:新附件了解详情。
所以使用本地的Nexus存储这样的事情或做内的Nexus一个单独的组,其不是公众可以访问的。 – khmarbaise
@khmarbaise,请查看图片了解当前状态。你的意思是什么“独立小组”,我该怎么做? “快照”目前不在“公共存储库”之下。 – user697911
制作一个新的存储库组请参见:https://books.sonatype.com/nexus-book/reference/config-sect-new-repo.html并将该快照添加到该组中... – khmarbaise