Handy safety tip: to create a RESTEasy-friendly Maven project in Eclipse, do the following:
- Create the project as a simple Maven project
- In the project Properties -> Project Facets, make the project faceted, and select "Dynamic Web Module" (you may get a NullPointerException, but it doesn't seem to matter). Under "Further Configuration...", point the WebApp directory to be
src/main/webapp
, and have it create theweb.xml
file. - Under "Web Content Settings", set the Context root
- Under "Deployment Assembly", select "Add...", select "Java Build Path Entries", and select "Maven Dependencies". It should put them in
WEB-INF/lib
. - Add the code and the dependencies to the
pom.xml
. Make sure to add the RESTEasy stuff to theweb.xml
file.
You should be able to deploy it from Eclipse into Tomcat without any issues