Jan's Blog

Thursday Nov 16, 2006

Maven Webapp Archetypes for Download

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.

Comments:

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 ?

Posted by Andres Almiray on November 23, 2006 at 10:00 AM EST #

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.

Posted by Jan Bartel on November 23, 2006 at 11:49 AM EST #

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 ?

Posted by Andres Almiray on November 23, 2006 at 12:26 PM EST #

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

Posted by Gene De Lisa on December 05, 2008 at 07:09 AM EST #

Gene, This is a slightly old blog entry and the location of the resources for download has moved.

The new location is:
http://www.webtide.com/resources/maven.jsp
And all other downloadable resources:
http://www.webtide.com/resources/downloads.jsp

regards
Jan

Posted by Jan Bartel on December 05, 2008 at 08:53 AM EST #

Post a Comment:
  • HTML Syntax: Allowed

Webtide

Calendar

Tags

Search

Links

Navigation