I have a nasty problem with my maven Eclipse plug-in. Both my project and my pom.xml seems to be fine, but the Eclipse plug-in fail to build my project. I have a maven instalation and from the command prompt I can "clean", "build", "install", "package" without any problem. However the Eclipse fails to resolve plug-in dependencies. Here is the m2e response when i perform clean from eclipse:
[Output]
[INFO] Scanning for projects... [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building Drools integration POC 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-> plugin/2.4.1/maven-clean-plugin-2.4.1.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 29.814s [INFO] Finished at: Thu Jan 30 17:38:51 EET 2014 [INFO] Final Memory: 5M/31M [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies >could not be resolved: Failed to read artifact descriptor for > org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not transfer artifact > org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to central (http://repo.maven.apache.org/maven2): Remotely Closed [id: 0x3cb31e28, /20.32.94.106:53305 > :> repo.maven.apache.org/185.31.16.192:80] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [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 read the > following articles: [ERROR] [Help 1] http: //cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Some details:
I can access repo.maven.apache.org/maven2 from my browser.
I am not connecting to internet via proxy. Therefore I do not have windows proxy configured.
While I run maven (not from Eclipse) I can clearly confirm that the dependencies are being downloaded properly without any network problem.
I have read the suggested link from the error.
I have tried this Plugin execution not covered by lifecycle configuration maven error. It didn't do the trick.
My Eclipse network proxy settings (Window.>Preferences->Network Connections) are set to "Native" (I have also tryed with the "Direct" option).
I am using Eclipse Kepler with m2e version 1.4.0.20130601
My Eclipse is able to connect with some repositories to install plug-ins from.
Does anyone have any suggestions how to make my m2e build my project properly?
Thanks!
EDIT: After the discussion with Ralf below, I switched my Eclipse to use the same maven installation that I am running from the command prompt. THIS HELPS!!! :D. I still have a problem with Eclipse, because Eclipse still indicates that my pom.xml has errors in it, because the repository is unreachable, but the maven build/compile is working though Eclipse, so its a partial solution. I will edit again, if I manage to solve the remaining issue! Thanks Ralf.