15 August 2013

How to solve problem with dynamic web project disapear after press spring tool's update maven dependecies?

Solution for folks who use STS(Eclipse),Spring framework 3.x,Maven 3

STORY:

You created a brand new Dynamic Web Project. Good!
Awesome ,then you  add  pom.xm to add libs for your spring project. Well done!
You press Spring Tools/ Update Maven Dependecies  and libs are added but ... project magically is covert to ordinary Java project,so option 'run on server' disapeared ... Woops!
What to do ? Good question.


SOLUTION:

  1. Press right click on project's root project and select preferences (or press alt+enter)
  2. Go to Project Facets
  3. turn on them (click on blue link)
  4. select Select Dynamic Web Module ,Java and whatever you using...
  5. Press apply,then ok
  6.  Press right click on project's root project  Spring nature 
  7. Press project/clean 
  8. Press refresh ... (F5).

Everything back to normal :)


REMEMBER!
Do not use Maven from Eclipse .
Use command line instead!
Eclipse and Maven are like North and South Korea ...