Question

I am trying to compile a java project with maven. I have tried it with the right click on pom file > Maven > Maven Install in Eclipse (m2eclipse connector)

Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) ... 
Could not transfer artifact org.apache.maven.shared:maven-filtering:pom:1.0 from/to maven-central (http://repo.maven.apache.org/maven2/)

Then I tried it in command prompt with mvn clean compile, but I got this screenshot:

enter image description here

It seems to me that maven can not access the maven-filtering-1.0 file, even though I can access the pom file in the browser using the same URL. I am new to maven and have no idea how to fix this. Any help is greatly appreciated!

Was it helpful?

Solution 2

I have solved this problem. Here is what I did. It might help sembody else facing the same difficulties.

I simply deleted everything I could in my local repository (~/.m2/repository). Then I ran the mvn install and everything worked fine.

Again, I did not have a proxy.

OTHER TIPS

If you're behind a proxy you can add a blurb to your ~/.m2/setting.xml

<settings>
  ....
  <proxies>
    <proxy>
      <id>Proxy name</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>your.proxy.hostname.or.IP</host>
      <port>8080</port>
      <!-- omit these auth params if not needed: -->
      <username>domain\\username</username>
      <password>123456</password>
      <nonProxyHosts>localhost|127.0.0.1|...</nonProxyHosts>
    </proxy>
  </proxies>

if not, try talking telnet or wget the POM from the command line:

wget http://repo.maven.apache.org/..../maven-filtering-1.0.pom

and try to determine what goes wrong from there.

Cheers,

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top