I need to deploy a production version of a web application. So far I have tested it with mvn jetty:run
. I used to use the actual settings of the pier, but they seem to you only necessary when you want to serve several wars on the same web server. In some ways, this is the most persistent ( mvn package
and copy it).
My other purpose is to create a runnable jar ( mvn assembly:single
) that will start the server, but I need to configure it so that the static content src/main/webapp
loaded and web.xml
can be found.
I also read about the "running war." This can avoid the src/main/webapp
problem, as these files are already located in the warfile. However, I do not know how to do this.
I could also stick with mvn jetty:run
, but this does not seem to be the best option, because then the production deployment is tied to code, and not to a separate bank.
Any opinions on the best ways or the pros and cons of these different approaches? Am I missing some options?
source share