Skip to main content

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


Check http://blog.avisi.nl/2012/03/05/servlet-api-3-0-classpath-scanning/ and specifically the last comment with this snippet:

<Configure class="org.eclipse.jetty.webapp.WebAppContext">
    <Set name="contextPath">/langur</Set>
    <Set name="war"><SystemProperty name="jetty.home"/>/langur</Set>
    <Set name="defaultsDescriptor">etc/webdefault.xml</Set>
    <Call name="setAttribute">
        <Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
        <Arg>.*/.*langur[^/]*\.jar$</Arg>
    </Call>
</Configure>

Hope that helps!

On Apr 11, 2012, at 9:00 PM, Paul Philion wrote:

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


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top