Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you want to package your application so that you can hand it to someone and have them run it as a standalone application without having to go through deploying a war file into a web container, then that is a different concern from doing <code>mvn jetty:run</code> at development time, I will call that deployment time to avoid any confusion</p> <p>At deployment time, we can't assume there will be maven on the machine, thus no <code>mvn jetty:run</code>, and even if there was, this would not work, unless we deliver the source code to run the build as in the development environment!</p> <p>A standalone web application can be packaged by bundling the jetty jars in the application war along with a Main class to start jetty programmatically, and get it to run the application war. This relies on the fact that the file and directory structure of the WAR and JAR are different, and thus there is no significant overlap between the two, which is what makes this workaround possible, and it also leaves the option of deploying the war file in a web container possible</p> <ul> <li><p>There is a <a href="http://alchim.sourceforge.net/winstone-maven-plugin/" rel="nofollow">maven plugin</a> that embeds <a href="http://winstone.sourceforge.net/" rel="nofollow">winstone</a> which is another lightweight servlet container</p></li> <li><p>For jetty, you may start by reading <a href="http://open.bekk.no/embedded-jetty-7-webapp-executable-with-maven/" rel="nofollow">Embedded Jetty 7 webapp executable with Maven</a></p></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload