http://numberformat.wordpress.com/2011/05/18/nexus-repository/ http://numberformat.wordpress.com/2011/05/18/nexus-repository/
我按照上面的链接设置 Maven 和 Nexus,一切都是新的。我无法在那里留下新评论,所以我在这里发帖。
这么长时间后,我在另一家公司,当我尝试在本地 PC 中设置一个简单的示例时,我在“mvn部署”到简单的 Maven my-app 示例中收到此错误。我安装了简单的 Nexus Open Source,没有 Tomcat。
[警告] 无法将元数据 com.mycompany.app:my-app:1.0-SNAPSHOT/maven-metadata.xml 传输至快照 (localhost:8081/nexus/content/repositories/snapshots):访问被拒绝:本地主机: 8081/nexus/content/repositories/snapshots/com/mycompany/app/my-app/1.0-SNAPSHOT/maven-metadata.xml ,原因短语:禁止。
在您的settings.xml中位于MAVEN_HOME/conf您必须在服务器部分添加
<server>
<id>nexus-releases</id>
<username>deploy</username>
<password>123456</password>
</server>
在你的 pom 中必须看起来像
<distributionManagement>
<repository>
<id>nexus-releases</id>
<url>http://localhost:8081/nexus/content/repositories/releases</url>
</repository>
</distributionManagement>
Id 必须相同。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)