If you have accidentally deleted the maven repository jars you installed by running maven install in Eclipse then you are reading the right tutorial. After facing this issue a couple of times and fixing it, I have written about the following solutions which can be used to retrieve the delete maven dependencies from Eclipse IDE. After adding a maven project in Eclipse, the Jar files look as shown below:

Solution 1 :

A very easy solution is to update the project using the option present in Maven menu as shown in following screenshot:

Note that running maven clean and maven install tasks will not work in this case as the deletion of dependency jar files is not detected in that case. After running the Update project task, you should get back the jar file and classpath issues should get resolved. If you are using any Eclipse version different from Juno, the above mentioned option could be present in some other setting.

Solution 2 :

If the above solution doesn’t resolve the issue, then simply delete the project from Eclipse workspace. Do not delete it from hard disk. In Eclipse now go to File -> New -> Import and choose “Existing Maven Projects”

Next browse the pom.xml file of your maven project and finish the wizard. You should get back the maven project in Eclipse. Now run maven install and then perform a project clean.

These steps should definitely resolve any dependency issues in Eclipse for your Maven project.

Force maven to download dependencies in Eclipse admin Eclipse
If you have accidentally deleted the maven repository jars you installed by running maven install in Eclipse then you are reading the right tutorial. After facing this issue a couple of times and fixing it, I have written about the following solutions which can be used to retrieve the...
If you have accidentally deleted the maven repository jars you installed by running <a href="http://www.javaexperience.com/spring-maven-project-using-eclipse-plugin/">maven install in Eclipse</a> then you are reading the right tutorial. After facing this issue a couple of times and fixing it, I have written about the following solutions which can be used to retrieve the delete maven dependencies from Eclipse IDE. After adding a maven project in Eclipse, the <a href="http://www.javaexperience.com/important-jar-files-in-jre/">Jar files</a> look as shown below: <img src="http://www.javaexperience.com/wp-content/uploads/2012/12/maven dependency in eclipse.png"/> <h2>Solution 1 :</h2> A very easy solution is to update the project using the option present in Maven menu as shown in following screenshot: <img src="http://www.javaexperience.com/wp-content/uploads/2012/12/maven update project.png"/> Note that running maven clean and maven install tasks will not work in this case as the deletion of dependency jar files is not detected in that case. After running the Update project task, you should get back the jar file and classpath issues should get resolved. If you are using any Eclipse version different from Juno, the above mentioned option could be present in some other setting. <h2>Solution 2 :</h2> If the above solution doesn't resolve the issue, then simply delete the project from Eclipse workspace. Do not delete it from hard disk. In Eclipse now go to File -> New -> Import and choose "Existing Maven Projects" <img src="http://www.javaexperience.com/wp-content/uploads/2012/12/existing maven project.png"/> Next browse the pom.xml file of your maven project and finish the wizard. You should get back the maven project in Eclipse. Now run maven install and then perform a project clean. These steps should definitely resolve any dependency issues in Eclipse for your Maven project.
The following two tabs change content below.
I run this blog with lots of passion. In this website, you will find tutorials on Core Java, Spring, Struts, Web Applications, Portals and Database. Please support me and the website by sharing the posts on your facebook / twitter. You can tap the share button at the top of each post. Thanks for the support.