I stumbled upon this while trying to make this work for a non-embedded solution. If someone is in a similar boat, the solution for this case is to create WEB-INF/jetty-env.xml with the following contents:
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> <Configure class="org.eclipse.jetty.webapp.WebAppContext"> <Set name="throwUnavailableOnStartupException">true</Set> </Configure>
The server will not start if an exception occurs.
source share