You might want to try using cargo instead. It should allow you to deploy
the WAR project into a container and start up that container.
Something like:
true
jetty6x
GROUP_ID
ARTIFACT_ID
VERSION
war
...
-Original Message-
From: richard schmidt [mailto:hangst...@gmail.com]
Sent: Thursday, December 11, 2008 3:48 PM
To: users@maven.apache.org
Subject: Starting a jetty server for client side tests
I have a WAR project that exposes some web services I also have a JAR
project that acts as a client application for the web services. The
client application makes http requests to the web services.
To run unit tests I need to set up a jetty server running the web
services.
I have tried the following
1) use the maven-dependency-plugin to extract the correct WAR from the
repository and copy it to sub directory in target.
2) use the maven-jetty-plugin to start a server running the WAR
downloaded in the previous step. The server can be started before
running the unit tests and stopped when the tests have finished.
The jetty plugin is as follows
org.mortbay.jetty
maven-jetty-plugin
9966
${basedir}/target/iceCreamWar/ICECream.war
stop
start-jetty
process-test-classes
run
stop-jetty
prepare-package
stop
However if I run it I get the following error message
[ERROR] BUILD ERROR
[INFO]
[INFO] Webapp source directory
C:\Workspace_MavenBuild\ICECreamClient\src\main\webapp does not exist
which is expected as the "run"goal assumes you have a normal web project
with a context.
If I change the goal to "run-war", then the jetty server does start for
the unit test, but only afterwoods. - the jetty documentation talks
about "Invokes the execution of the lifecycle phase package prior to
executing itself." which I presume is what is happening.
Any ideas how to get around this one?
Richard
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org