Building the Multimodule Project
With the simple-weather
project containing
all the general code for interacting with the Yahoo!
Weather service and the simple-webapp
project
containing a simple servlet, it is time to compile and package the
application into a WAR file. To do this, you will want
to compile and install both projects in the appropriate order; since
simple-webapp
depends on
simple-weather
, the
simple-weather
JAR needs to be
created before the simple-webapp
project can
compile. To do this, you will run mvn clean
install from the simple-parent
project:
~/examples/ch06/simple-parent$ mvn clean install [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Simple Parent Project [INFO] simple-weather [INFO] simple-webapp Maven Webapp [INFO] ---------------------------------------------------------------------------- [INFO] Building simple-weather [INFO] task-segment: [clean, install] [INFO] ---------------------------------------------------------------------------- [...] [INFO] [install:install] [INFO] Installing simple-weather-1.0.jar to simple-weather-1.0.jar [INFO] ---------------------------------------------------------------------------- [INFO] Building simple-webapp Maven Webapp [INFO] task-segment: [clean, install] [INFO] ---------------------------------------------------------------------------- [...] [INFO] [install:install] [INFO] Installing simple-webapp.war to simple-webapp-1.0.war [INFO] [INFO] ------------------------------------------------------------------------ ...
Get Maven: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.