在我的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