Maven 专家存储库身份验证
我尝试将安装程序部署到本地存储库: --settings.xml-- 人工日志:Maven 专家存储库身份验证,maven,deployment,repository,artifactory,Maven,Deployment,Repository,Artifactory,我尝试将安装程序部署到本地存储库: --settings.xml-- 人工日志: 2013-05-27 16:14:38,158 [DENIED DEPLOY] libs-snapshot-local:xxx/0.1-SNAPSHOT /xxx-0.1-20130527.121430-3.pom for anonymous/192.168.6.36. 如果我将服务器/存储库id更改为“myserver.com”-部署工作! 但这不适合我,因为在myserver.com上,这不适用于svn 我尝
2013-05-27 16:14:38,158 [DENIED DEPLOY] libs-snapshot-local:xxx/0.1-SNAPSHOT
/xxx-0.1-20130527.121430-3.pom for anonymous/192.168.6.36.
如果我将服务器/存储库id更改为“myserver.com”-部署工作!
但这不适合我,因为在myserver.com上,这不适用于svn
我尝试将标记“profile”和“mirror”添加到server.xml中,并将“distributionManagement”添加到pom.xml中,得到了相同的错误
服务器/存储库id必须仅命名为“我的服务器”
更新1:
我从pom.xml中删除了标记“repositories”,并添加了标记“DistributionManager”:
---pom.xml---
“存储库”标记用于解决问题,而不是用于部署。我推测'DistributionManager'标记下的存储库id是'myserver.com',这就是为什么它与settings.xml中的服务器声明相匹配的原因。还有唯一版本false,这在maven 3中不受支持。
<repositories>
<repository>
<id>myrepo</id>
<url>http://myserver.com/artifactory/libs-release-local</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.4:
deploy (default-deploy) on project xxx: Failed to deploy artifacts: Co
uld not transfer artifact xxx:xxx:war:0.1-20130527.121430-3 from/to myserver.com
(http://myserver.com:8083/artifactory/libs-snapshot-local): Failed to transfer file:
http://myserver.com:8083/artifactory/libs-snapshot-local/xxx/0.1-SNAPSHOT
/xxx-0.1-20130527.121430-3.war. Return code is: 401
2013-05-27 16:14:38,158 [DENIED DEPLOY] libs-snapshot-local:xxx/0.1-SNAPSHOT
/xxx-0.1-20130527.121430-3.pom for anonymous/192.168.6.36.
<distributionManagement>
<repository>
<id>myrepo</id>
<name>myrepo</name>
<url>http://myserver.com/artifactory/libs-release-local</url>
</repository>
<snapshotRepository>
<id>myrepo</id>
<name>myrepo</name>
<url>http://myserver.com/artifactory/libs-snapshots-local</url>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
</distributionManagement>
<profiles>
<profile>
<id>artifactory</id>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>http://myserver.com/artifactory/libs-release-local</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://myserver.com/artifactory/libs-snapshot-local</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
<server>
<id>snapshots</id>
<username>deployer</username>
<password>123456</password>
</server>
<server>
<id>central</id>
<username>deployer</username>
<password>123456</password>
</server>
<distributionManagement>
<repository>
<id>central</id>
<name>Internal Releases</name>
<url>http://myserver.com/artifactory/libs-release-local</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>Internal Snapshots</name>
<url>http://myserver.com/artifactory/libs-snapshots-local</url>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
</distributionManagement>
Failed to deploy artifacts: Could not transfer artifact xxx:xxx:war:0.1-20130528.050526-1 from/to snapshots (http://myserver.com/artifactory/libs-snapshots-local)