[英]Deploy Maven artifacts on Sonatype Nexus repository hosted on Linux
我是Sonatype Nexus和 Maven 的新手,並嘗試了Maven 中給出的示例 Example 。 我在將 Maven 生成的工件部署到在 Linux 上運行的 Nexus 時遇到問題。 如果我的pom.xml
有 'localhost:8081' 作為存儲庫,則部署成功。 如果我用 IP 地址 (10.193.4.5:8081) 替換 localhost,則部署失敗並出現“拒絕訪問”錯誤。 詳情如下。
Error:
Downloading: h ttp://10.193.4.5:8081/nexus/content/repositories/snapshots/org/sonatype/mavenbook/simple/parent/0.8-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.sonatype.mavenbook.simple:parent:0.8-SNAPSHOT/maven-metadata.xml from/to testing
(http://10.193.4.5:8081/nexus/content/repositories/snapshots): Access denied to: http://10.193.4.5:8081/nexus/content/repositories/snapshots/org/sonatype/mavenbook/simple/parent/0.8-SNAPSHOT/maven-metadata.xml
org.sonatype.aether.transfer.MetadataTransferException:
Could not transfer metadata org.sonatype.mavenbook.simple:parent:0.8-SNAPSHOT/maven-metadata.xml from/to testing (http://10.193.4.5:8081/nexus/content/repositories/snapshots): Access denied to:
http://10.193.4.5:8081/nexus/content/repositories/snapshots/org/sonatype/mavenbook/simple/parent/0.8-SNAPSHOT/maven-metadata.xml
我的配置細節如下。
settings.xml
快照部署部署pom.xml
testing Internal Releases http://10.193.4.5:8081/nexus/content/repositories/snapshots</url>--> http://localhost:8081/nexus/content/repositories/snapshots我猜這與 Linux 上的權限問題有關,我無法調試。
您的問題很可能與網絡有關,而不是與 Nexus 設置有關。 嘗試
nc -vz 10.193.4.5 8081
在控制台查看是否可以將數據包路由到該地址。 要使其與 IP 一起使用,您可能需要添加 /etc/hosts 條目。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.