The maven mvn archetype:create command is a powerful one. It can create you a whole new ready-to-run application, complete with templated sources, config files etc. It takes a lot of the pain out of starting a new application.

Webtide has created a collection of maven webapp project archetypes which are freely downloadable from our site. We’ve made archtypes for most of the popular webapp technologies: DWR, ActiveMQ-Web, Dojo, SiteMesh, Tapestry, WebWorks, Struts, Spring and more.

It’s just 4 easy steps to starting a new project:

  1. download the mini-maven project for the archtype of your choice
  2. build the archetype with mvn install
  3. generate your project with mvn archetype:create …
  4. execute your new webapp immediately with mvn jetty:run

Now you have a freshly-made, running project with the webapp techology of your choice already baked in and ready for you to modify and extend. You have saved yourself hours or even days of work!

I knew archetypes were powerful, but it was brought home to me today answering a question on the jetty lists. A user was having problems with a sitemesh webapp. I simply downloaded our sitemesh archetype, generated a sitemesh app and modified it to match the user’s configuration.

It took me all of 5 minutes until I had a working webapp I could use to try to replicate the problem!

Without the archetype, it would have taken me hours researching sitemesh, downloading it, making a maven project and a webapp that worked.

Even sweeter, just changing a single line in the generated webapp’s pom.xml allowed me to immediately run the webapp under a different version of jetty with the mvn jetty:run command. I was able to try out the webapp’s behaviour with 3 different versions of jetty in under 5 minutes!

We want our maven archetype portfolio to be as comprehensive as possible, so if you spot a technology we don’t have covered, please contact us and suggest it.

Maven Webapp Archetypes for Download

8 thoughts on “Maven Webapp Archetypes for Download

  • November 22, 2006 at 5:00 pm
    Permalink

    Great! I downloaded the Spring archetype and was a bit shocked by the Spring version (1.0.2), that’s really old. What about the dependencies in the other archetypes ?

  • November 22, 2006 at 6:49 pm
    Permalink

    Right you are re the spring version. I think the spring folks changed the groupId they were using to publish to maven and we accidentally picked up the old one. We’re doublechecking all the versions now are the most up-to-date ones available on ibiblio for all the archtypes. Thanks for the heads-up.

  • November 22, 2006 at 7:26 pm
    Permalink

    Jan, not to be too picky but what if the archetypes provide dependencies for testing like spring-mock for the Spring archetype ? maybe it could be enabled with cli options ?

    • March 4, 2012 at 7:19 am
      Permalink

      “In fact, i would probably reuse ant spicrts that i already wrote or from others.”Most IDEs will create a directory structure for you and you should always have code smippets or templates at your diisposal anyway.Tools will be available to generate ant or mvn xml files so this is really a moot issue.In fact there’s more keystrokes in in that one maven create line then there would be to get an initial ant script up usign cut and paste.The debate on using central repositories (and/or how) should be separate from this initial round so it should really be:Maven 0 Ant 0

  • December 4, 2008 at 2:09 pm
    Permalink

    Not quite ready. I get this:
    HTTP ERROR: 404
    NOT_FOUND
    RequestURI=/resources.jsp
    Powered by Jetty://

  • April 5, 2010 at 12:57 pm
    Permalink

    I still can’t access the eclipse download site

  • April 5, 2010 at 1:37 pm
    Permalink

    You need to register and login to the http://www.webtide.com site before you can download some resources like the maven archetypes – have you created yourself an account and logged in? We’ve tested the archtypes and they seem to download fine – can you email info@webtide.com with a description of what is wrong and we’ll take a look.

    cheers

    Jan

Comments are closed.