问题描述
今天使用maven3.0.4 deploy时,一直报认证失败。具体Error 信息如下:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-depl
oy) on project corba: Failed to deploy artifacts/metadata: No connector available to access reposito
ry scm.deploy.account (dav:http://repo.***/snapshots/) of type default
using the available factories WagonRepositoryConnectorFactory -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
分析
其实在ERROR log中已经给了提示信息,No connector available to access reposito
ry scm.deploy.account (dav:http://repo.***/snapshots/) of type default
using the available factories WagonRepositoryConnectorFactory。
只是对maven仓库的部署机制不了解,没注意到“dav:http“如此重要的关键字。
解决
<project> ... <build> ... <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-webdav-jackrabbit</artifactId> <version>2.2</version> </extension> </extensions> </build> ... </project>
参考:
http://docs.codehaus.org/display/MAVENUSER/Deploying+3rd+Party+Jars+With+WebDAV
https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html