Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error shown when creating new Maven project in Eclipse

When I am trying to create new project on Maven in eclipse IDE ,It shows the following errors:

"Could not get the value for parameter encoding for plugin execution default-resources Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 ()"

Anyone please tell what I have to do?

can anyone tell me the steps to create Spring project with Maven enabled?

POM.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.spring</groupId>
  <artifactId>SpringMaven</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  <name>SpringMaven</name>
</project>
like image 225
Nithya Avatar asked Sep 11 '14 12:09

Nithya


2 Answers

The following steps worked for me:

  1. Close Eclipse.
  2. Navigate to user home directory. (For example: "C:\Users\YourUserName\.m2")
  3. Delete the "repository" folder.
  4. Re-open Eclipse.
  5. Click on the Maven project that has an issue and go to "Project" --> "Clean".
  6. Right-click on the project and go to "Maven" --> "Update Project...".
  7. Close Eclipse.
  8. Open Eclipse.
  9. Click on the project folder in the "Project Explorer" window (usually on the left).
  10. Hit the F5 key a few times to Refresh your project.
  11. Done!

These steps worked for me. If this works for you make sure to upvote, otherwise drop a comment.

like image 80
specialk1st Avatar answered Oct 05 '22 23:10

specialk1st


Delete maven resource plugin jars (delete the whole folder) from this location - {user.home}.m2\repository\org\apache\maven\plugins\maven-resources-plugin and then try to rebuild again.

like image 22
Ankit Avatar answered Oct 05 '22 22:10

Ankit