2

Morning,

I must submit this question, as I have been fighting for 3 days with using the Maven repository in Eclipse Oxygen. I think I've used all existing stack overflow pages.

The Maven version shown by Eclipse is Embedded 3.3.9.

When opening the POM.xml, I will get the following:

Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (https://repo.maven.apache.org/maven2): Failed to connect to repo.maven.apache.org/151.101.36.215:443

To connect to the internet I am behind a corporate proxy, so the Eclipse network connections use Active Provider and proxy entries for HTTP/HTTPS.

I can open the Maven repository from a browser (https://repo.maven.apache.org/maven2/).

What I have tried to date is as follows: - use a custom settings.xml file, either with Maven repositories (tried with https or http) or a proxy or together. The file is in C:\Users\user.m2 and I load it from Eclipse. - save the certificate that I see in a browser and put it in the JDK/JRE key import into cacerts. - check that the root certificate of the Maven repo (DigiCert Global Root CA) are trusted.

This page Problems using Maven and SSL behind proxy shows many of the tips I've been trying to apply to no avail.

I am also not able to explore the repository from the Available Software dialog, whether I set an HTTP (http://repo1.maven.org/maven2) or HTTPS (https://repo.maven.apache.org/maven2/) for Maven. Eclipse invariably replies "org.eclipse.equinox.p2.core.ProvisionException. Connect to repo1.maven.org:80 timed out".

All other repositories work ok.

Any idea?...

Sylvain
  • 21
  • 1
  • If you can open a page in the browser but not in Eclipse, it might be a User Agent based filtering of requests. If you can, install Fiddler and watch the traffic and the answers you get. You can even manipulate the User Agent of the Eclipse traffic and test whether the problem is connected to that. – J Fabian Meier Nov 09 '17 at 12:03
  • Can you build with maven from the command line? – Thorbjørn Ravn Andersen Nov 09 '17 at 15:49
  • Hi Thorbjorn, your comment made me think of doing something simple. Thank you. I cleared all settings from Maven (settings.xml), and then installed the M2Eclipse plugin. From there, I created a correct pom.xml and browsed mvnrepository.com to add relevant dependencies for the war packaging. From there, on running a Maven install, the Maven trace shows that the necessary jar files are downloaded from the Maven repo. So, I do not solve the connection to the repo itself, but Maven is able to work with its repository as expected. – Sylvain Nov 15 '17 at 14:47

0 Answers0