I\'m using win8 previously I had been running Eclipse Juno on my pc but from now on I wanted to start using STS, I am getting the below error as soon as I create a new project.
So I get you are using Eclipse with the M2E plugin. Try to update your Maven configuration : In the Project Explorer, right-click on the project, Maven -> Update project.
If the problem still remains, try to clean your project: right-click on your pom.xml, Run as -> Maven build (the second one). Enter "clean package" in the Goals fields. Check the Skip Tests box. Click on the Run button.
Edit: For your new problem, you need to add Spring MVC to your pom.xml. Add something like the following:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
Maybe you have to change the version to match the version of your Spring framework. Take a look here:
http://mvnrepository.com/artifact/org.springframework/spring-webmvc
I'm a little late to the party but I'll give my two cents. I just resolved this issue after spending longer than I'd like on it. The above solutions didn't work for me and here's why:
there was a network issue when maven was downloading the required repositories so I actually didn't have the right jars. adding a -U to a maven clean install went and got them for me. So if the above solutions aren't working try this:
Hope it works for you.
I got the same problem and this is how i solved. :
I finally found my maven repo mirror is down. I changed to another one, problem solved.
I have solved it using "force update", pressing Alt+F5 as it is mentioned in the following link.
Although it's too late , But here is my experience .
Whenever you get your maven project from a source controller or just copying your project from one machine to another , you need to update the dependencies .
For this Right-click on Project on project explorer -> Maven -> Update Project.
Please consider checking the "Force update of snapshot/releases"
checkbox.
If you have not your dependencies in m2/repository then you need internet connection to get from the remote maven repository.
In case you have get from the source controller and you have not any unit test , It's probably your test folder does not include in the source controller in the first place , so you don't have those in the new repository.so you need to create those folders manually.
I have had both these cases .