sample implementation based on
- http://news-anand.blogspot.com/2012/05/today-i-am-going-tell-you-how-to-create.html
- http://examples.javacodegeeks.com/enterprise-java/rest/resteasy/json-example-with-resteasy-jackson/
mvn clean package
mvn assembly:assembly
This will produce a deployable tar.gz in the target/ folder (target/web-server-{VERSION}-bundle.tar.gz)
$ tar -zxvf web-server-{VERSION}-bundle.tar.gz
$ chmod +x run.sh
$ ./run.sh
or
$ java -cp .:lib/* com.embedded.WebServer
$ curl http://localhost:9009/echo/hi
GET Echo: hi
$ curl -X POST -H "content-type: application/json" -d '{"echo": "hi"}' http://localhost:9009/echo
POST Echo: hi