Julien,
Embedding Jetty6 is pretty simple. The jetty.xml config file is written
in a straightforward mapping from the java API to xml syntax. There is the
beginnings of a guide to embedding jetty also on the wiki at:
http://docs.codehaus.org/display/JETTY/Embedding+Jetty
Jetty is often used in the unit tests of other projects - a jetty Server
instance is started in the test setup and stopped in the test teardown.
However, if you want to use the plugin instead, you simply include the
relevant lines into your pom.xml file, and invoke it:
mvn jetty6:run
When you want to stop it, you <cntrl-c> it.
There is all the information on how to configure and run the plugin
here:
http://jetty.mortbay.org/jetty6/maven-plugin/index.html
cheers
Jan
Julien Henry wrote:
Hi Jan,
I tried to migrate to Jetty 6, but there are too few doc about how to
use embedded Jetty. I discovered that a Jetty6 plugin exists, and I
think it could be a good thing to start jetty before the JUnit tests,
and to stop Jetty after, because it exactly what I want. Do you know a
simple way to do this ?
Thanks
Julien
Jan Bartel a écrit :
Hi Julien.
Jetty 5.x is built by ant, but the artifacts are made available on
ibiblio. The jetty5.x series, whilst the current stable series is
about to be superceded by the 6.x series.
Jetty 6.x is built by maven2 and has full poms with dependencies
listed which maven2 will transitively resolve for you.
I suggest you switch to jetty 6.x as 1) it is built by maven2 and
2) anyway has many many less dependencies.
cheers
Jan
Julien Henry wrote:
Hi,
I'm using Jetty to test my project. I have this in my pom (I use JSP) :
<dependency>
<groupId>jetty</groupId>
<artifactId>org.mortbay.jetty</artifactId>
<version>5.1.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jetty</groupId>
<artifactId>jasper-runtime</artifactId>
<version>4.2.20RC0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jetty</groupId>
<artifactId>jasper-compiler</artifactId>
<version>4.2.20RC0</version>
<scope>test</scope>
</dependency>
But the server can't be launched. I discovered that Jetty need
org.apache.commons-logging. So I added :
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
<scope>test</scope>
</dependency>
But why don't put commons-logging as a dependency of Jetty in the pom
on ibiblio ?
Thanks
Julien
This message contains information that may be privileged or
confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not
the intended recipient, you are not authorized to read, print,
retain, copy, disseminate, distribute, or use this message or any
part thereof. If you receive this message in error, please notify the
sender immediately and delete all copies of this message.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]