mvn help:system报错

mvn help:system最后出错:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-help-plugin:2.1.1:
system (default-cli) on project standalone-pom: Execution default-cli of goal or
g.apache.maven.plugins:maven-help-plugin:2.1.1:system failed: Plugin org.apache.
maven.plugins:maven-help-plugin:2.1.1 or one of its dependencies could not be re
solved: Could not transfer artifact org.apache.maven.plugin-tools:maven-plugin-t
ools-api:jar:2.4.3 from/to central (http://repo1.maven.org/maven2): Error transf
erring file: Connection timed out: connect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException


解决:设置HTTP代理
编辑~/.m2/settings.xml文件添加代理配置如下:

<settings>
… 
<proxies>

    <proxy>

      <id>my-proxy</id>

      <active>true</active>

      <protocol>http</protocol>

      <host>本机IP</host>

      <port>80</port>

      <!--

      <username>***</username>

      <password>***</password>

      <nonProxyHosts>repository.mycom.com|*.google.com</nonProxyHosts>

      -->

    </proxy>

  </proxies>
  …
</settings>

猜你喜欢

转载自meifage.iteye.com/blog/1090217
mvn
今日推荐