Tuesday, July 31, 2007

[Tech] Webapplication "Quickstart"

Creating (Java, what else *g*) Web-Applications with a new framework is not always an easy task. Where to put which config file, which config options, how to make the build process correctly, how to start the application in the servlet container and how to make an eclipse project and the like. Yesterday (thank you Reinhard) I was pointed to a really great resource:

Webtide, the company behind the Jetty Servlet-Server project provides a set of archetypes for Maven to create "hello world" webapplications for a broad range of different Web-frameworks (Wicket, Struts, Tapestry, Spring, Webapp with ActiveMQ...).

What does that mean?

(1) you download the artefact you are interested in, e.g. Wicket, unzip it and call mvn install (to install it in your local repository)

(2) you call for example:

mvn archetype:create -DarchetypeGroupId=com.webtide -DarchetypeArtifactId=maven-archetype-Wicket -DarchetypeVersion=1.0-SNAPSHOT -DgroupId=info.schatten -DartifactId=my-wicket-app

and the archetype creates a simple Wicket (or whatever archetype you selected) webapplication with Maven build settings, including the jetty plugin. So type:

(3) mvn jetty:run and the application start.

This is really a helpful set of artifacts to start from!

No comments: