How to speed up deployment on Jetty?

The deployment of the Jetty server is very slow (about 45 seconds), which is difficult for development, so I'm looking for tips on how to speed it up.

I use Maven with the Jetty plugin (berth-maven-plugin), and berth: run the target in the vaadin project created from the ar.type com.vaadin: vaadin-archetype-application.

I found a link here: wiki.eclipse.org/Jetty/Howto/Avoid_slow_deployment , and it makes sense that this is a problem, because there are a lot of jar files that need to be scanned (from the vaadin framework), but I cannot figure out where to put the xml file, what to call it and how to get maven jetty: run the goal of using it (and I tried a lot about the variations that I could think of!)

Any help is appreciated!

+4
source share
2 answers
Gregg pointed me in the right direction. Here is the complete information on how I solved this:

1) I added a file called jetty-web.xml to the src / main / webapp / WEB-INF folder. It contained:

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
    <Call name="setAttribute">
        <Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
        <Arg>nothing.jar</Arg>
    </Call>
</Configure>
Run code

Please note that at the moment I do not need to scan, so I just insert the dummy entry "nothing.jar" in accordance with the template.

2) Edit the Jetty-maven-plugin entry in pom.xml: in the section I added

<contextXml>${basedir}/src/main/webapp/WEB-INF/jetty-web.xml</contextXml>
Run code

Now redistribution occurs in just a couple of seconds.

+1
source

All Articles