|
[
Brett
]
Do yourself a favour - check out Jetty6.
Luckily, Jetty6 to the rescue. I've heard much about it recently and I know they just did a Maven 2 plugin that sounded cool. I wasn't really aiming to learn another new technology, but thought it was worth a shot since it was on my todo list and I wasn't getting anywhere. Less than 5 minutes later, the environment is running flawlessly with features I've had to fumble around to set up for other containers in the past:
First, the normal Maven2 stuff: run the archetype command to generate a skeleton webapp project, start adding web content, and run mvn package to build the WAR. I'd done all this before using Tomcat today. Because of the way I was using Tomcat, I wasn't using mvn package, but had used mvn idea:idea to generate the appropriate webapp IDEA module and was letting it do all the exploded webapp creation in the Maven layout, so I could continue to use that as is. To set up Jetty6, I added this to the POM: <plugin> The rest of the defaults were fine. Then: mvn jetty6:runJetty is now sitting on localhost:8080 with the webapp running, listening for changes. This is my ideal set up for development, and I don't see myself going back any time soon. A huge thanks to the Greg and Jan for their work on this. I'm really looking forward to using it some more. It looks great, and much easier than Tomcat for development purpose... I tried it quickly (took really 5mins), the only problem I got now is that my project expect some libraries to be provided by the container (such as the jdbc driver, javamail, activation, and others...) which then have the scope "provided" in the POM... It doesn't seem that the maven jetty plugin add them to the classpath, and I think it should... Maybe I'm wrong or I missed something... Cannot ask to get everything working in only 5mins ! I'll definitively give it a go, anyway and spend some more time figuring things out... Thanks for the tip ! --Samuel Le Berrigaud, January 11, 2006 12:57 AM
Samuel, you could add a profile to your POM defining the additional dependencies with default scope. Then run jetty with Cheers, --Ralph, January 11, 2006 01:44 AM
Hi Brett, Nice blog post. I love Jetty too. For anyone interested here's how to do the same thing using the Cargo m2 plugin: http://blogs.codehaus.org/people/vmassol/archives/001307_cargo_v07_and_maven2_plugin_v01.html Thanks --Vincent Massol, January 11, 2006 07:09 AM
Great plugin from Jetty guys, but, do you know how (or if it is possible) can the plugin be aware about changes in configuration files? For example, changes in spring configuration files, sitemesh decorator definitions, *.properties, etc etc Thanks in advance! --rb, January 12, 2006 06:31 PM
Brett, http://www.opensymphony.com/webwork/wikidocs/QuickStart.html And thanks to the IDEA plugin for Maven as inspiration, QuickStart will now read your IDEA .iml files and use that to configure the Jetty server. --Patrick Lightbody, February 5, 2006 12:05 PM
Note to the unwary: jetty6 has been renamed to jetty. Change your poms accordingly or be prepared to spend much more than 5 minutes to get this running. The current version of jetty6 (the one from july 2006) is still available, but not working with the circulating examples. Hope this helps. related error: --iwein, October 1, 2006 12:44 AM
[URL=http://nuuboypn.com]vglqymyi[/URL] tzifektw bowsbzcw http://safpsepi.com oufqxmlv rgmpanwg --fukknwar, October 8, 2007 05:32 PM
Hi, I am working porting jetty4 to jetty6, my jetty4 configuration looks as how
--Kumar, February 6, 2008 06:54 AM
Depend not on another, but lean instead on thyself...True happiness is born of self-reliance. --hoodia, March 25, 2008 12:12 PM
An adventure is only an inconvenience rightly considered. An inconvenience is an adventure wrongly considered. --generic prozac, March 25, 2008 12:12 PM
If your daily life seems poor, do not blame it; blame yourself, tell yourself that you are not poet enough to call forth its riches. --bextra octadecenoic havener, March 25, 2008 12:13 PM
Post a comment
|