The Jetty8 have to scan all the jar files to search those "Servlet3" features (web-fragment / annotations ... etc )
solution 1:add the following code to web.xml:
metadata-complete="true"
if it doesnt work,go to solution 2:
step 1:create a file called jetty-contexts.xml, and put it under the src/test/java/
<?xml version="1.0"?> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> <Configure class="org.eclipse.jetty.webapp.WebAppContext"> <Call name="setAttribute"> <Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg> <Arg>.*/.*jsp-api-[^/]\.jar$|./.*jsp-[^/]\.jar$|./.*taglibs[^/]*\.jar$ </Arg> </Call> </Configure>
step 2: modify your pom.xml config:
<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>8.1.12.v20130726</version> <configuration> <contextXml>src/test/java/jetty-contexts.xml</contextXml> <webAppConfig> <defaultsDescriptor>src/test/java/webdefault.xml</defaultsDescriptor> <contextPath>/solr</contextPath> </webAppConfig> </configuration> </plugin>
now your jetty:run should run like hell!