Could not calculate build plan: Plugin org.apache.maven.plugins:maven-jar-plugin:2.3.2 or one of its dependencies could not be resolved
I solved it now. However it only is solved in Netbeans. Not sure why eclipse still won't take the settings.xml that is changed. The solution is however to remove/comment the User/Password param in settings.xml
Before:
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>proxyserver.company.com</host>
<port>8080</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
</proxies>
After:
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<host>proxyserver.company.com</host>
<port>8080</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
</proxies>
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved
I had the exact same problem.
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5: Failure to find org.apache.maven.plugins:maven-resources-plugin:pom:2.5 in http://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 -> [Help 1]
...
Had maven 3.0.5, eclipse Kepler with JBoss Dev Studio 7 installed. Computer sitting on internal network with proxy to the internet. Here's what I did.
0. Check the maven repositiory server is up
1. Check Proxy is set up and working
First I thought it was a proxy problem, I made sure that maven settings.xml contained the proxy settings (settings.xml can exist in two places one in MAVEN_HOME. The other in %userprofile%.m2\ with the later having higher precedence):
<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>
and checked that the proxy is working by trying to telnet to it:
telnet [proxy] [port number]
2. Check not Eclipse Issue
ran 'mvn compile' at command line level outside of eclipse - same issue.
If 'mvn compile' worked. But it doesn't work using the maven plugin in eclipse, see Maven plugin not using eclipse's proxy settings
3. Check not Cache Issue
Deleted all contents in my local maven repository. (Default location: ~/.m2/repository) And then reran maven - same issue came up.
4. What worked for me
Automatically download & install missing plugin:
By declaring the missing plugin in the POM file build section for pluginManagement Maven will automatically retrieve the required plugin. In the POM file, add this code for the version of the plugin you require:
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Manually install missing plugin:
I went to http://mvnrepository.com/artifact/org.apache.maven.plugins/maven-resources-plugin/2.5 and downloaded maven-resources-plugin-2.5.jar and maven-resources-plugin-2.5.pom . Copied it directly into the maven repository into the correct folder ( ~/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/2.5) and reran 'mvn compile'. This solved the problem.
Edit1
Following this I had another two problem with 'mvn install':
The POM for org.apache.maven.plugins:maven-surefire-plugin:jar:2.10 is missing, no dependency information available
The POM for org.apache.maven.plugins:maven-install-plugin:jar:2.3.1 is missing, no dependency information available
I approached this problem the same way as above, downloading from http://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin/2.10 and http://mvnrepository.com/artifact/org.apache.maven.plugins/maven-install-plugin/2.3.1
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved
Try the following steps:
Make sure you have connectivity (you can browse) (This kind of error is usually due to connectivity with Internet)
Download Maven and unzip it
Create a
JAVA_HOME
System VariableCreate an
M2_HOME
System VariableAdd
%JAVA_HOME%\bin;%M2_HOME%\bin;
to yourPATH
variableOpen a command window
cmd
. Check:mvn -v
If you have a proxy, you will need to configure it
http://maven.apache.org/guides/mini/guide-proxies.html
Make sure you have
.m2/repository
(erase all the folders and files below)If you are going to use Eclipse, You will need to create the
settings.xml
Maven plugin in Eclipse - Settings.xml file is missing
You can see more detail in
http://maven.apache.org/ref/3.2.5/maven-settings/settings.html
Related Topics
How to Use Try-With-Resources with Jdbc
Number of Days Between Two Dates in Joda-Time
Why Integer Class Caching Values in the Range -128 to 127
How to Resolve a Java Rounding Double Issue
Can You Recommend a Java Library for Reading (And Possibly Writing) CSV Files
Difference in Days Between Two Dates in Java
Simple Http Server in Java Using Only Java Se API
How to Turn Off the Eclipse Code Formatter for Certain Sections of Java Code
Why Do We Usually Use || Over |? What Is the Difference
Conditionally Ignoring Tests in Junit 4
What Is the "Continue" Keyword and How Does It Work in Java
Java 8: Difference Between Two Localdatetime in Multiple Units
Using Regular Expressions to Extract a Value in Java