Maven的任何其他原因"无法检索插件描述符"除了代理

时间:2014-08-22 20:42:42

标签: proxy maven-3

我告诉其他帖子中的此错误是代理未正确设置的结果

但是我确实在settings.xml中设置了代理(我们没有用户名/密码)

这个maven错误还有其他原因吗?

i.e.: 


  .m2>

<settings>
  <proxies>
   <proxy>
      <active>true</active>
      <protocol>http</protocol>
      <host>proxy.ours.net</host>
      <port>8080</port>
    </proxy>
  </proxies>
</settings>


 C:>mvn archetype:generate -DgroupId=com.mycompany
.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -Dinte
ractiveMode=false
[INFO] Scanning for projects...
Downloading: http://uk.maven.org/maven2/org/apache/maven/plugins/maven-clean-plu
gin/2.5/maven-clean-plugin-2.5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
n-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or on
e of its dependencies could not be resolved: Failed to read artifact descriptor
for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
Downloading: http://uk.maven.org/maven2/org/apache/maven/plugins/maven-install-p
lugin/2.4/maven-install-plugin-2.4.pom

etc

       [WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from http://u
k.maven.org/maven2 was cached in the local repository, resolution will not be re
attempted until the update interval of UK has elapsed or updates are forced. Ori
ginal error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml fr
om/to UK (http://uk.maven.org/maven2): Not authorized by proxy , ReasonPhrase:Pr
oxy Authentication Required.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

1 个答案:

答案 0 :(得分:3)

虽然代理通常不需要用户/密码进行maven构建下载,但需要用户/密码。