0

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:

  1. I can access repo.maven.apache.org/maven2 from my browser.

  2. I am not connecting to internet via proxy. Therefore I do not have windows proxy configured.

  3. While I run maven (not from Eclipse) I can clearly confirm that the dependencies are being downloaded properly without any network problem.

  4. I have read the suggested link from the error.

  5. I have tried this Plugin execution not covered by lifecycle configuration maven error. It didn't do the trick.

  6. My Eclipse network proxy settings (Window.>Preferences->Network Connections) are set to "Native" (I have also tryed with the "Direct" option).

  7. I am using Eclipse Kepler with m2e version 1.4.0.20130601

  8. 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.

Community
  • 1
  • 1
Milen Igrachev
  • 259
  • 7
  • 17
  • And Eclipse points to the same nexus-settings.xml that you are using on the command line? Preferences -> Maven -> User Settings. – Ralf Jan 30 '14 at 17:29
  • @Ralf : Yes, I just made sure of that. – Milen Igrachev Jan 30 '14 at 17:35
  • Have you tried to completely delete the repo that Eclipse is pointing to? Or to point it to a new repo-location? – Ralf Jan 30 '14 at 17:37
  • I haven't try that untill you suggested it. I deleted my old repository and retry the clean. The Eclipse clean result in the same response as I detailed above. The .m2/repository/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom.lastUpdated was created and no other repository dependencies were fetched. – Milen Igrachev Jan 30 '14 at 17:45
  • Have you run the build with -X for the detailed log output as suggested? Could you post that info as well? – Ralf Jan 30 '14 at 17:52
  • You could use a pastebin and share the link for starters. – Ralf Jan 30 '14 at 19:41
  • Done, thanks. Here it is: http://pastebin.com/UQRbY6C4 – Milen Igrachev Jan 30 '14 at 20:01
  • Well, the repository server closes the HTTP connection. But no indication as to why it would do that. A last question: Your eclipse is using the same maven installation as you do on the command line? Preferences -> Mave -> Installations. If not, set it to your external installation and try again. Note that if you use a saved run-configuration, the run-configuration is not automatically updated to use the new default. – Ralf Jan 31 '14 at 11:59

0 Answers0