问题描述
今天使用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
本文讨论了使用Maven3.0.4部署时遇到的认证失败问题,通过分析错误日志发现仓库访问方式配置不当。文章提供了解决方法,包括引入特定仓库访问组件,确保正确配置仓库URL及访问权限,从而成功部署项目。

被折叠的 条评论
为什么被折叠?



