Maven plugin for eclipse, proxy problem

I use m2eclipse to integrate Eclipse (Indigo) and Maven. I also use a proxy server, so I have a Settings.xml file with the correct host and port. I also configured the LAN settings for the OS, so Eclipse is configured in the same way (native mode). Finally, I installed external maven as an Eclipse installation (Maven 2.2.1).

Once I have done this, I import from the Eclipse a Maven project. When I do mvn install, the artifacts load and I get Build Succesfull. However, the project notes a mistake.

The type of error is different if it is a project with dependencies (pom dependencies) or a simple project. For example, in a simple project, the error "Unable to calculate assembly plan: connection timeout". In a complex project, some artifacts that are in the repository are not read.

I think the problem is with the plugin and proxy, because it appears on the console when eclipse starts up, "Cannot update the index for the central http://repo1.maven.org/maven2/ ".

Any idea?

thanks for the help

Angel

+6
source share
3 answers

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

So, try changing the maven setting in eclipse as shown below and specify the same setting.xml which is in the maven folder configuration.

Maven setting eclipse

+5
source

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

My workaround at the time was always a convenient command line to search for new dependencies.

+1
source

I had the same problem with Maven error: Could not calculate build plan: connection timed out


What was finally fixed: full cleanup and rebuild :

Project> Clear ...
(x) Clear all projects
(x) Building an entire workspace

0
source

Source: https://habr.com/ru/post/899808/


All Articles