Question

I am reading about running embedded jetty in my SpringMVC 3.2 applications and a friend of mine suggested using the jetty-maven-plugin instead. I have been doing some research and am wondering what the pros and cons are for choosing one over the other.

Était-ce utile?

La solution

Typically the jetty-maven-plugin is used for development purposes, it lets you launch a webapp from the commandline, deploy into jetty and autoreload as class files or static content are changed.

Embedded jetty is often used for integrating jetty as an http server or servlet engine into your application, often bypassing the concept of a war file all together and building out servlet contexts directly in your java code. Alternately people dislike the idea of distributing their application in war files or in a distribution form, so they use jetty in a Main class type format where they bootstrap the application and deploy their webapp transparently to the user, making it seem like there isn't even a war file in play at all. Embedded jetty is also often used in test cases either as a way of deploying your application without the overhead of other test tooling liks WTP or what have you. We use jetty embedded extensively throughout our test cases for jetty itself.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top