Chapter 2. Installing and Running Maven

This chapter contains very detailed instructions for installing Maven on a number of different platforms. Instead of assuming a level of familiarity with installing software and setting environment variables, we’ve opted to be as thorough as possible to minimize any problems that might arise due to a partial installation. The only thing this chapter assumes is that you’ve already installed a suitable Java Development Kit (JDK). If you are just interested in installation, you can move on to the rest of the book after reading through the “Downloading Maven” and “Installing Maven” sections. If you are interested in the details of your Maven installation, this entire chapter will give you an overview of what you’ve installed and the Apache Software License.

Verify Your Java Installation

Although Maven can run on Java 1.4, this book assumes that you are running at least Java 5. Go with the most recent stable JDK available for your operating system. Either Java 5 or Java 6 will work with all of the examples in this book:

% java -version
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode, sharing)

Maven works with all certified Java-compatible development kits, and a few noncertified implementations of Java. The examples in this book were written and tested against the official Java Development Kit releases downloaded from the Sun Microsystems web site. ...

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.