2
我正在使用maven 2.2.1和Eclipse Helios作为IDE当我从命令提示符运行mvn deploy时,部署成功 但是当我使用Eclipse Maven plug并试图从那里部署Maven:无法传输工件错误代码401,需要授权
我得到下面的异常
[INFO] Total time: 1.148s
[INFO] Finished at: Mon Oct 03 21:22:57 IST 2011
[INFO] Final Memory: 10M/104M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project bayer: Failed to deploy artifacts: Could not transfer artifact com.tata:bayer:pom:1.0 from/to Test (dav:http://127.0.0.1/sites/): Access denied to http://127.0.0.1/sites/com/tata/bayer/1.0/bayer-1.0.pom. Error code 401, Authorization Required -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
在我的pom.xml文件,我有这个
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav-jackrabbit</artifactId>
<version>1.0-beta-7</version>
</extension>
</extensions>
<distributionManagement>
<repository>
<id>Test</id>
<name>Parent Project</name>
<url>dav:http://127.0.0.1/sites/</url>
</repository>
</distributionManagement>
and in M2_HOME Settings.xml file i have these
<servers>
<server>
<id>Test</id>
<username>admin</username>
<password>Testing</password>
<filePermissions>664</filePermissions>
<directoryPermissions>775</directoryPermissions>
</server>
</servers>
最后,Apache网络服务器等,其中我使用存储库的目的里面,我有这些
Alias /sites "/httpd-2.2-x64/sites"
<Directory "/httpd-2.2-x64/sites">
Dav On
Order Allow,Deny
Allow from all
AllowOverride All
AuthType Digest
AuthName DAV-upload
# You can use the htdigest program to create the password database:
# htdigest -c "/httpd-2.2-x64/user.passwd" DAV-upload admin
AuthUserFile "/httpd-2.2-x64/user.passwd"
AuthDigestProvider file
# Allow universal read-access, but writes are restricted
# to the admin user.
<LimitExcept GET OPTIONS>
require user admin
</LimitExcept>
</Directory>
有谁请告诉我为什么我收到此
错误代码401,需要授权 - > [求助1]
(再次合作下comamnd提示罚款,但不能从Eclipse IDE的Maven插件)
非常感谢您
您是否找到对这个问题的回答。我面临同样的问题。 –