In this section, we will install and use Maven to build a simple Java project to ensure that the tool is configured appropriately. The first time it runs, it will cache many JAR files from the Central repository into a folder ${user.home}/.m2/repository
; for subsequent runs it will be much faster.
Go to http://maven.apache.org/ and download the Maven 3.0.5.zip package (for Windows) or Maven 3.0.5.tgz (for Mac OS X/Linux).
Unzip/untar the package and install Maven at a convenient directory, referred to in these instructions as
MAVEN_HOME
.Either add
MAVEN_HOME/bin
to thePATH
environment variable or specify the full path to the Maven executable JAR. Runmvn --version
and if all works well, a version message should be printed out.To create a new Maven project, run
mvn archetype:generate
-DarchetypeGroupId=org.apache.maven.archetypes
-DarchetypeArtifactId=maven-archetype-quickstart
-DarchetypeVersion=1.1
When prompted for the
groupId
, entercom.packtpub.e4...