mvn jetty:run 启动很慢解决办法

阅读更多
jetty8,使用jetty:run时启动相当慢,原因是:
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/



	
		org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern
		.*/.*jsp-api-[^/]\.jar$|./.*jsp-[^/]\.jar$|./.*taglibs[^/]*\.jar$
		
	



step 2: modify your pom.xml config:

				org.mortbay.jetty
				jetty-maven-plugin
				8.1.12.v20130726
				
					src/test/java/jetty-contexts.xml
					
						src/test/java/webdefault.xml
						/solr
					
				
			


now your jetty:run should run like hell!

你可能感兴趣的:(jetty:run,mvn,slow)