Maven Pom.xml issue

I'm trying to make a spring mvc project using maven and getting following error in pom.xml:

CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 from http:// repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 from/to central (http:// repo.maven.apache.org/maven2): Connection refused: no further information to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.pom

Is it related to proxy or firewall? What can I do to fix it?


Sounds like you need to set up a maven proxy in your settings.xml .

Have a look (for example) in your web browser and see how it is set up.

From the documentation on Configuring a proxy:

<proxy>
  <active>true</active>
  <protocol>http</protocol>
  <host>proxy.somewhere.com</host>
  <port>8080</port>
  <username>proxyuser</username>
  <password>somepassword</password>
  <nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
</proxy>

I fixed a similar problem (ie Could not transfer artifact... connection refused...) in my case by fixing the repositories. Actually, I added the release repo where only the milestone one was present and refused connections. Sugg.: check which repo are needed and/or copy them from a POM without the issue.

<repositories>
    <repository>
        <id>repo.springsource.org.milestone</id>
        <name>Spring Framework Maven Milestone Repository</name>
        <url>https://repo.springsource.org/milestone</url>
    </repository>
    <repository> <!-- this one added -->
        <id>repository.springframework.maven.release</id>
        <name>Spring Framework Maven Release Repository</name>
        <url>http://maven.springframework.org/release</url>
    </repository>
</repositories>

<proxy>
  <id>myproxy</id>
  <active>true</active>
  <protocol>http</protocol>
  <username>chenchu.madhiboina</username>  <!-- LOG in username/Put your username here -->
  <password>hari01</password>  <!-- LOG in password/Put your password here -->
  <host>xx.xx.xx.xx</host>   <!-- Put the IP address of your proxy server here -->
  <port>80</port>            <!-- Put your proxy server's port number here -->
  <nonProxyHosts>local.net|some.host.com</nonProxyHosts> <!-- Do not use this setting unless you know what you're doing. -->
</proxy>    
链接地址: http://www.djcxy.com/p/87282.html

上一篇: pom.xml中的Maven .m2编译器错误

下一篇: Maven Pom.xml问题