Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Spring MVC Beginner's Guide

You're reading from   Spring MVC Beginner's Guide Your ultimate guide to building a complete web application using all the capabilities of Spring MVC

Arrow left icon
Product type Paperback
Published in Jun 2014
Publisher
ISBN-13 9781783284870
Length 304 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Amuthan Ganeshan Amuthan Ganeshan
Author Profile Icon Amuthan Ganeshan
Amuthan Ganeshan
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Configuring a Spring Development Environment 2. Spring MVC Architecture – Architecting Your Web Store FREE CHAPTER 3. Control Your Store with Controllers 4. Working with Spring Tag Libraries 5. Working with View Resolver 6. Intercept Your Store with Interceptor 7. Validate Your Products with a Validator 8. Give REST to Your Application with Ajax 9. Apache Tiles and Spring Web Flow in Action 10. Testing Your Application A. Using the Gradle Build Tool B. Pop Quiz Answers Index

Time for action – installing the Maven build tool

Many build tools are available for building a Java project. We are going to use Maven 3.2.1 as our build tool. Let's take a look at how we can install Maven:

  1. Go to Maven's download page by entering the following URL on your browser:

    http://maven.apache.org/download.cgi

  2. Click on the apache-maven-3.2.1-bin.zip download link, and start the download.
  3. Once the download is finished, go to the downloaded directory and extract the .zip file into a convenient directory of your choice.
  4. Now we need to create one more environment variable, called M2_HOME, in a way that is similar to the way in which we created JAVA_HOME. Enter the extracted Maven zip directory's path as the value for the M2_HOME environment variable.
  5. Create one more environment variable, called M2, with the value %M2_HOME%\bin, as shown in the following screenshot:
    Time for action – installing the Maven build tool

    Setting the M2 environment variable

  6. Finally append the M2 variable to the PATH environment variable as well by simply appending the;%M2% text to the PATH variable's value.

Now we have installed the Maven build tool in our computer. To verify whether our installation has been carried out correctly, we need to follow steps that are similar to the Java installation verification. Open a new command window, type mvn –version, and press Enter; you will see the following details of the Maven version:

C:\>mvn -version
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T12:37:52-05:00)
Maven home: C:\Program Files\apache-maven-3.2.1
Java version: 1.7.0_51, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_51\jre
Default locale: en_SG, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime