Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Unable to disable annotation scanning using "metadata-complete"

Greetings,  

I am using "jetty:run" to test my web app, but it takes over 60 seconds to initialize.

I tracked down to the "metadata-complete=true" option (in web.xml), but it is not helping. This is making my code-test cycle really painful!

My web.xml:

<web-app xmlns="http://java.sun.com/xml/ns/javaee";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
    version="2.5"
    metadata-complete="true">



Some logs (with LEVEL=DEBUG):

% mvn -Dorg.eclipse.jetty.LEVEL=DEBUG jetty:run
….
[INFO] >>> jetty-maven-plugin:8.1.2.v20120308:run (default-cli) @ webapp >>>


….
2012-04-11 11:47:51.393:DBUG:oejw.WebDescriptor:file:[….]/webapp/src/main/webapp/WEB-INF/web.xml: Calculated metadatacomplete = True with version=2.5


….
2012-04-11 11:47:53.691:DBUG:oeja.AnnotationConfiguration:Metadata-complete==true, not processing discoverable servlet annotations for context o.m.j.p.JettyWebAppContext{/,file:[….]/webapp/src/main/webapp/},file:[….]/webapp/src/main/webapp/


….
2012-04-11 11:47:53.759:DBUG:oeja.AnnotationConfiguration:No annotation on initializer class org.apache.jasper.runtime.TldScanner
2012-04-11 11:47:53.759:DBUG:oeja.AnnotationConfiguration:Scanning all classses for annotations: webxmlVersion=2 configurationDiscovered=true
2012-04-11 11:47:53.759:DBUG:oeja.AnnotationConfiguration:Scanning container jars


….
[58 seconds of JarScanner logs, for everything in the classpath]

So, the logs seem to indicate that the "metadata-complete" is recognized, but the classpath is scanned anyhow!

Any suggestions?

Thanks!

--  
Paul Philion




Back to the top