Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Attempting to integrate quickstart in the build process

So it looks like we might need to do a bit more work on the documentation.

I'm not really sure which aspect you're having trouble with:  the pre-generation of the quickstart war or the use of the webapp afterwards?

If it's pre-generation, you don't necessarily have to do a special step in the generation of your webapp to generate the quickstart-web.xml. Instead, you can just let jetty lazily generate the quickstart-web.xml when the webapp starts for the first time.  To do that, use the instructions on the doco page you linked and follow the section "In XML".  The "autoPregenerate=true" will tell jetty to generate the quickstart-web.xml if it isn't already present. When it generates the quickstart descriptor, you'll see a line like this on startup: 

INFO:oejq.QuickStartDescriptorGenerator:main: Quickstart generating

You'll know its faster if you have any annotations in your webapp and a lot of jars in WEB-INF/lib, because it will be noticeably faster to start ;).  Without the quickstart, or when it's lazily generating the quickstart for the first time, you'll see a line like:

INFO:oeja.AnnotationConfiguration:main: Scanning elapsed time=xxxms

On subsequent restarts you won't see that line.

As the doco mentions, there is a goal of the maven-jetty-plugin that uses quickstart to generate an effective web.xml for you - if you want you can save the output of mvn jetty:effective-web-xml into a file called quickstart-web.xml and put it into your webapp, but that would be a bit of a manual process.

Sounds like it would be useful to have a maven plugin that did the quickstart generation as part of a webapp build cycle, don't fancy contributing one do you? :)

cheers
Jan


On 10 May 2017 at 15:19, Federico Fissore <federico@xxxxxxxxxxx> wrote:
Hi all

I'm struggling with the quickstart documentation [1] and I haven't been able to trigger it so far
I would like to pre generate quickstart-web.xml, so that the docker jetty image packed with my war will have shorter startup times.

It's unclear
 - if the contex file must still be created, even if quickstart file is pregenerated
 - how I will know quickstart has been used, despite the supposed shorter startup times

I have found no example of maven/gradle integration, and the docs don't describe one.

Is anyone using it? How did you integrate it?

[1] http://www.eclipse.org/jetty/documentation/9.4.x/quickstart-webapp.html
_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


Back to the top