Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven plugin for eclipse, proxy issue

I use m2eclipse to integrate Eclipse (Indigo) and Maven. I also use a proxy, so I have a Settings.xml with the correct host and port. I've configured the LAN Settings of the OS too, so Eclipse is configured in the same way (Native mode). Finally, I have put an external maven as the Eclipse installation (Maven 2.2.1) .

Once I did that, I import from Eclipse a Maven project. When I do "mvn install" the artifacts are downloaded, and I get the "Build Succesfull". However, the project marks an error.

The error type is different if is a project with dependencies (pom dependencies) or a simple project. For example, in a simple project the error is "Could not calculate build plan: connection timed out". In a complex project doesn't read some artifacts, which are in the repository.

I think the problem is the plugin and the proxy because in the console appears when eclipse starts, "Unable to update index for central http://repo1.maven.org/maven2/".

Any idea?

Thank you for your help

Ángel

like image 214
ariveirab Avatar asked Oct 21 '11 16:10

ariveirab


2 Answers

Since your build is working fine I believe your setting.xml is maven installation folder is working fine.

So try to change the maven setting in eclipse as shown below and refer the same setting.xml that is there in the maven folder configuration.

Maven setting eclipse

like image 79
Naveen Babu Avatar answered Oct 12 '22 20:10

Naveen Babu


Not a very helpful answer, but I ran into the same problem. m2eclipse didn't seem to handle proxies (either eclipse or .settings) very well.

My workaround at the time was to always have a command line handy to pull in new dependencies.

like image 44
ptyx Avatar answered Oct 12 '22 20:10

ptyx