Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Maven Archetype for Embedded Jetty

I completely see your points. I don't want to introduce something that's already covered in documentation. I'll try my best to speak to the value that I see here.

The embeddability of Jetty is well explained and people are generally aware of it. What this does goes a little further than the examples. There are some steps between the simple embedding examples and running a full fledged application. The Maven plugin works so well because it explicitly adds project dependencies to the classpath before it launches. That avoids issues like taglib resolution and makes the embedded server work more like a general purpose application server rather than something tailored to a single application. I haven't seen an example of doing the same thing outside of that plugin and without building an intermediary war file.

I think that the flow of building an application with Maven, but then being able to launch it without Maven or anything else other than Java and project dependencies is nice and makes for a great dev/deploy flow. There were enough headaches, for me, in making this work that I want others to be able to skip the pain. This could be something that's just documented too, but since this still requires Maven it makes sense, to me, as an archetype.

An archetype like this could be used two ways. It could start a project the way the existing archetypes are likely used. It is also lightweight enough that it can be used to create a new project that existing code can be brought into. In both cases the archetype is a faster path to the goal than following a "how to" would be because of the nature of the project structure.

On 07/19/2011 11:21 AM, Jesse McConnell wrote:
http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded

We have these examples on how easy it is to embed and I hadn't really
seen where a maven archetype was needed so far.

Is your thought that people are generally unaware of how easy
embedding jetty is and an archetype might help get them started?  I
wonder about that because my typical use case is I have code already
and I want to then fire it up somehow, whereas the archetype flow for
me is more at the actual start of the project.  My embedding is with
the project code and rarely another complete artifact..

I am open to the idea though, how do you see people typically using
something like this?

cheers,
jesse

--
jesse mcconnell
jesse.mcconnell@xxxxxxxxx



On Tue, Jul 19, 2011 at 13:10, John Simone<jsimone@xxxxxxxxxxxxxx>  wrote:
Are there any Maven archetypes being distributed for creating a web
application with an embedded instance of Jetty? I've seen the archetypes
here: http://www.webtide.com/resources/maven.jsp, but I'm thinking of
something that launches from a traditional main method or simple launcher
shell script rather than the maven plugin. I think this gives a little more
control over the launch environment and allows an application to easily be
launched by a developer in the same way it is in production (Assuming one
doesn't feel right about using Maven as a launch wrapper in production).

I put together the archetype that is referenced in this tutorial:
https://gist.github.com/1054400

Could this, or something like it, be beneficial to offer as an example of a
different way to build applications and a way to showcase how easily
embeddable Jetty is?
_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev

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



Back to the top