QA:Failed to deploy artifacts from/to snapshots XX Failed to transfer file Return code is: 405, ReasonPhrase:Method Not Allowed.

QA:

Failed to deploy artifacts from/to snapshots XX Failed to transfer file Return code is: 405, ReasonPhrase:Method Not Allowed.

Solution:

maven目录conf的setting.xml里,

  1.   <server>  
  2.     <id>releases</id>  
  3.     <username>admin</username>  
  4.     <password>admin123</password>  
  5.   </server>  
  6.  <server>  
  7.   <id>snapshots</id>  
  8.   <username>admin</username>  
  9.   <password>admin123</password>  
  10.   </server>  
  11. </servers>  

注意这里的id要和pom.xml里远程deploy的地址对应一致,我的pom.xml里配置:

    1. <!-- 配置远程发布到私服,mvn deploy -->  
    2.     <distributionManagement>  
    3.         <repository>  
    4.             <id>releases</id>  
    5.             <name>Nexus Release Repository</name>  
    6.             <url>http://10.1.81.199:8081/nexus/content/repositories/releases/</url>  
    7.         </repository>  
    8.         <snapshotRepository>  
    9.             <id>snapshots</id>  
    10.             <name>Nexus Snapshot Repository</name>  
    11.             <url>http://10.1.81.199:8081/nexus/content/repositories/snapshots/</url>  
    12.         </snapshotRepository>  
    13.     </distributionManagement
      url必须是artifactory中有的
posted @ 2015-06-26 15:15  sikewang  阅读(3631)  评论(0编辑  收藏  举报