Adding WTP Facet to project via maven

Sometimes when I add new project to my workspace I want to make it available for quick deploy to application container (in my case Tomcat). To do this I have to add WTP project facets. It can be easily done by using Maven plugins.

Check this example from pom.xml:


I added here maven-compiler-plugin because without this you can get following error message:

Dynamic Web Module 2.5 requires Java 1.5 or newer.