A sample standalone server showing how to wire up Jersey, Jetty and Guice together to achieve RESTful bliss.
Simply:
$ mvn install
-
Create project from archetype
$ mvn archetype:generate -DarchetypeGroupId=org.birchall -DarchetypeArtifactId=jersey-jetty-guice-archetype -DarchetypeVersion=1.0
-
Start the server
$ mvn compile exec:java -Dexec.mainClass=com.mycorp.Main
-
Check it works
$ curl "http://localhost:8080/foo" bar