zaterdag 14 juli 2007

maven and jetty for quick dev deploy

Jetty is a java powered lightweight servlet container. It can be used as an embedded container bringing webapps closer to desktop applications. But that's another story. Here I will quickly explain how you can even quicker deploy your webapp on a jetty container using the maven jetty plugin.

All you need to do is add some configuration for the jetty plugin in you pom file. Like this basic config:

<?xml version="1.0"?>
<!-- dependencies here -->

Next you can run your application using the following goal

mvn jetty:run

First time will take a bit longer because of the dependencies that need to be downloaded. Once up and running you'll see

[INFO] Started Jetty Server
[INFO] Starting scanner at interval of 10 seconds.

And that means your application is waiting for you at (replace yourContext with your project context)


o jetty project homepage
o maven jetty plugin config
o maven jetty plugin goals
o more on jetty

Geen opmerkingen:

Een reactie posten