When I am try to build the project it gives this error.
Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'ProjectName'.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
My Java version is 1.8 and Maven version is 3.2.5
And also when I first time configure Maven in my computer and I check that Maven configured correctly with mvn --version
command and it works fine.
But after restart my computer and checked Maven is work correctly.
Then it says:
C:\Users\User Name>mvn --version
'mvn' is not recognized as an internal or external command,
operable program or batch file.
Maven is written in Java and is used to build projects written in C#, Scala, Ruby, etc. Based on the Project Object Model (POM), this tool has made the lives of Java developers easier while developing reports, checks build and testing automation setups.
The Resources Plugin handles the copying of project resources to the output directory. There are two different kinds of resources: main resources and test resources.
Try update your Eclipse with the newest Maven repository as follows:
Try the following :
Make sure you add M2_HOME
variable to your environment variables. It looks like you might have set M2_HOME
temporarily in a cmd
window and not as a permanent environment variable. Also append M2_HOME
to the PATH
variable.
Go to the m2
folder in your user directory.
Example: On Windows, for user bot
, the .m2
directory will be under C:\Users\bot
. Look for the settings.xml
file in this directory and look for the repository url within this file. See if you are able to hit this url from your browser. If not, you probably need to point to a different maven repository or use a proxy.
If you are able to hit the repository url from the browser, then check if the repository contains the maven-resource-plugin
version 2.6. This can be found by navigating to org.apache.maven.plugins
folder in the browser. It's possible that your pom
has hard-coded the dependency of the plugin to 2.6 but it is not available in the repository. This can be fixed by changing the depndency version to the one available in the repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With