org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Faile
If your working at a company, they may be preventing you from downloading outside software and installing it. You may need to install the plugins manually or repoint to an internal mirror repository.
You should check Force Update Snapshots/Releases
when updating project with maven.It worked for me :-).
What I found out is that while m2e is looking for v2.5 by default, my local repo has 2.6 and no 2.5.
Without going into investigation of how this came about simply adding the dependency to pom solved the problem
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
</dependency>
This can be removed after running a build once
I could solve the issue with the following steps
3. Set the proxy in settings.xml in Maven installation
(C:\path\apache-maven-3.6.0\conf)
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>optional-proxyuser</username>
<password>optional-proxypass</password>
<host>proxy.host.net</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
Update the Maven User Settings
Update Maven project
Couple of things to try:
settings.xml
file (at the following location {your home folder}/.m2/settings.xml
). Are you sure the local repo is where you think it is? (Yes, a mistake I've made in the past...)mvn -U dependency:resolve
should do it. The -U forces Maven to download no matter what your repository update policies are. Add -X
to get detailed debug logging.In my case I'm using an external maven installation with m2e. I've added my proxy settings to the external maven installation's settings.xml file. These settings haven't been used by m2e even after I've set the external maven installation as default maven installation.
To solve the problem I've configured the global maven settings file within eclipse to be the settings.xml file from my external maven installation.
Now eclipse can download the required artifacts.