Java Reference
In-Depth Information
</configuration>
</configuration>
<executions>
<executions>
<execution>
<execution>
<id>
<id> start-jetty </id>
</id>
<phase>
<phase> pre-integration-test </phase>
</phase>
<goals>
<goals>
<goal>
<goal> run </goal>
</goal>
</goals>
</goals>
<configuration>
<configuration>
<scanIntervalSeconds>
<scanIntervalSeconds> 0 </scanIntervalSeconds>
</scanIntervalSeconds>
<daemon>
<daemon> true </daemon>
</daemon>
</configuration>
</execution>
</configuration>
</execution>
<execution>
<execution>
<id>
<id> stop-jetty </id>
</id>
<phase>
<phase> post-integration-test </phase>
</phase>
<goals>
<goals>
<goal>
<goal> stop </goal>
</goal>
</goals>
</execution>
</goals>
</execution>
</executions>
</executions>
</plugin>
</plugin>
The final plug-in is the Jetty plug-in, which is responsible for running the Jetty-embedded
servlet container. After the WAR file is built, the Jetty container will boot up an HTTP server
under port 8080. The WAR file is then deployed into Jetty.
I don't really need to explain the specifics of the entire Jetty plug-in configuration. The inter-
esting bits that you might want to tweak are the port (8080) and the stopPort (9999). You
may have to change these if there is a service on your computer already using these network
ports.
Running the Build
To run the build, simply type mvn install at the command prompt from the ex03_1 direct-
ory. The output will look something like this:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ex03_1 2.0
[INFO] ------------------------------------------------------------------------
[INFO]
Downloading: http://download.java.net/maven/1
Search WWH ::




Custom Search