Maven: The Definitive Guide: The Definitive Guide


For too long, developers have worked on disorganized application projects, where every part seemed to have its own build system, and no common repository existed for information about the state of the project. Now there's help. The long-awaited official documentation to Maven is here.

Written by Maven creator Jason Van Zyl and his team at Sonatype, Maven: The Definitive Guide clearly explains how this tool can bring order to your software development projects. Maven is largely ...

See more details below
$21.78 price
(Save 37%)$34.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (14) from $12.03   
  • New (5) from $19.33   
  • Used (9) from $12.03   
Maven: The Definitive Guide: The Definitive Guide

Available on NOOK devices and apps  
  • NOOK Devices
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK Study
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$15.49 price
(Save 44%)$27.99 List Price


For too long, developers have worked on disorganized application projects, where every part seemed to have its own build system, and no common repository existed for information about the state of the project. Now there's help. The long-awaited official documentation to Maven is here.

Written by Maven creator Jason Van Zyl and his team at Sonatype, Maven: The Definitive Guide clearly explains how this tool can bring order to your software development projects. Maven is largely replacing Ant as the build tool of choice for large open source Java projects because, unlike Ant, Maven is also a project management tool that can run reports, generate a project website, and facilitate communication among members of a working team.

To use Maven, everything you need to know is in this guide. The first part demonstrates the tool's capabilities through the development, from ideation to deployment, of several sample applications — a simple software development project, a simple web application, a multi-module project, and a multi-module enterprise project.

The second part offers a complete reference guide that includes:

  • The POM and Project Relationships
  • The Build Lifecycle
  • Plugins
  • Project website generation
  • Advanced site generation
  • Reporting
  • Properties
  • Build Profiles
  • The Maven Repository
  • Team Collaboration
  • Writing Plugins
  • IDEs such as Eclipse, IntelliJ, ands NetBeans
  • Using and creating assemblies
  • Developing with Maven Archetypes

Several sources for Maven have appeared online for some time, but nothing served as an introduction and comprehensive reference guide to this tool — until now. Maven: The Definitive Guide is the ideal book to help you manage development projects for software, web applications, and enterprise applications. And it comes straight from the source.

Read More Show Less

Product Details

  • ISBN-13: 9780596517335
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 10/1/2008
  • Edition number: 1
  • Pages: 470
  • Sales rank: 410,602
  • Product dimensions: 7.00 (w) x 9.10 (h) x 1.20 (d)

Meet the Author

Sonatype Company is Jason Van Zyl's company and pretty much the center of the Maven universe. Jason Van Zyl is the inventor and lead developer of Maven.

Read More Show Less

Table of Contents

Maven... What Is It?;
Font Conventions;
Maven Writing Conventions;
Using Code Examples;
Safari® Books Online;
How to Contact Us;
Chapter 1: Introducing Apache Maven;
1.1 Convention over Configuration;
1.2 A Common Interface;
1.3 Universal Reuse Through Maven Plugins;
1.4 Conceptual Model of a “Project”;
1.5 Is Maven an Alternative to XYZ?;
1.6 Comparing Maven and Ant;
1.7 Summary;
Chapter 2: Installing and Running Maven;
2.1 Verify Your Java Installation;
2.2 Downloading Maven;
2.3 Installing Maven;
2.4 Testing a Maven Installation;
2.5 Maven Installation Details;
2.6 Getting Help with Maven;
2.7 Using the Maven Help Plugin;
2.8 About the Apache Software License;
Maven by Example;
Chapter 3: A Simple Maven Project;
3.1 Introduction;
3.2 Creating a Simple Project;
3.3 Building a Simple Project;
3.4 Simple Project Object Model;
3.5 Core Concepts;
3.6 Summary;
Chapter 4: Customizing a Maven Project;
4.1 Introduction;
4.2 Defining the Simple Weather Project;
4.3 Creating the Simple Weather Project;
4.4 Customize Project Information;
4.5 Add New Dependencies;
4.6 Simple Weather Source Code;
4.7 Add Resources;
4.8 Running the Simple Weather Program;
4.9 Writing Unit Tests;
4.10 Adding Test-Scoped Dependencies;
4.11 Adding Unit Test Resources;
4.12 Executing Unit Tests;
4.13 Building a Packaged Command-Line Application;
Chapter 5: A Simple Web Application;
5.1 Introduction;
5.2 Defining the Simple Web Application;
5.3 Creating the Simple Web Project;
5.4 Configuring the Jetty Plugin;
5.5 Adding a Simple Servlet;
5.6 Adding J2EE Dependencies;
5.7 Conclusion;
Chapter 6: A Multimodule Project;
6.1 Introduction;
6.2 The Simple Parent Project;
6.3 The Simple Weather Module;
6.4 The Simple Web Application Module;
6.5 Building the Multimodule Project;
6.6 Running the Web Application;
Chapter 7: Multimodule Enterprise Project;
7.1 Introduction;
7.2 The Simple Parent Project;
7.3 The Simple Model Module;
7.4 The Simple Weather Module;
7.5 The Simple Persist Module;
7.6 The Simple Web Application Module;
7.7 Running the Web Application;
7.8 The simple-command Module;
7.9 Running simple-command;
7.10 Conclusion;
Maven Reference;
Chapter 8: Optimizing and Refactoring POMs;
8.1 Introduction;
8.2 POM Cleanup;
8.3 Optimizing Dependencies;
8.4 Optimizing Plugins;
8.5 Optimizing with the Maven Dependency Plugin;
8.6 Final POMs;
8.7 Conclusion;
Chapter 9: The Project Object Model;
9.1 Introduction;
9.2 The POM;
9.3 POM Syntax;
9.4 Project Dependencies;
9.5 Project Relationships;
9.6 POM Best Practices;
Chapter 10: The Build Lifecycle;
10.1 Introduction;
10.2 Package-Specific Lifecycles;
10.3 Common Lifecycle Goals;
Chapter 11: Build Profiles;
11.1 What Are They For?;
11.2 Portability Through Maven Profiles;
11.3 Profile Activation;
11.4 External Profiles;
11.5 Settings Profiles;
11.6 Listing Active Profiles;
11.7 Tips and Tricks;
11.8 Summary;
Chapter 12: Maven Assemblies;
12.1 Introduction;
12.2 Assembly Basics;
12.3 Overview of the Assembly Descriptor;
12.4 The Assembly Descriptor;
12.5 Controlling the Contents of an Assembly;
12.6 Best Practices;
12.7 Summary;
Chapter 13: Properties and Resource Filtering;
13.1 Introduction;
13.2 Maven Properties;
13.3 Resource Filtering;
Chapter 14: Maven and Eclipse: m2eclipse;
Installing the m2eclipse Plugin;
Installing Prerequisites;
Installing Subclipse;
Installing Mylyn;
Installing AspectJ Development Tools (AJDT);
Installing the Web Tools Platform (WTP);
Installing m2eclipse;
Enabling the Maven Console;
Creating a Maven Project;
Checking Out a Maven Project from SCM;
Creating a Maven Project from a Maven Archetype;
Creating a Maven Module;
Create a Maven POM File;
Importing Maven Projects;
Importing a Maven Project;
Materializing a Maven Project;
Running Maven Builds;
Working with Maven Projects;
Adding and Updating Dependencies and Plugins;
Creating a Maven Module;
Downloading Source;
Opening Project Pages;
Resolving Dependencies;
Working with Maven Repositories;
Searching For Maven Artifacts and Java classes;
Indexing Maven Repositories;
Using the Form-Based POM Editor;
Analyzing Project Dependencies in m2eclipse;
Maven Preferences;
Chapter 15: Site Generation;
15.1 Introduction;
15.2 Building a Project Site with Maven;
15.3 Customizing the Site Descriptor;
15.4 Site Directory Structure;
15.5 Writing Project Documentation;
15.6 Deploying Your Project Web Site;
15.7 Customizing Site Appearance;
15.8 Tips and Tricks;
Chapter 16: Repository Manager;
History of Nexus;
Installing Nexus;
Downloading Nexus from Sonatype;
Installing Nexus;
Running Nexus;
Post-Install Checklist;
Startup Scripts for Linux;
Add Nexus as a service on Red Hat, Fedora, and CentOS;
Add Nexus as a service on Ubuntu;
Running Nexus Behind a Proxy;
Using Nexus;
Browsing Repositories;
Browsing Groups;
Searching for Artifacts;
Browsing System Feeds;
Browsing Log Files and Configuration;
Changing Your Password;
Configuring Maven to Use Nexus Repositories;
Using the Nexus Central Proxy Repository;
Using Nexus for Snapshot Repositories;
Adding Custom Repositories for Missing Dependencies;
Adding a New Repository;
Adding a Repository to a Group;
Configuring Nexus;
Customizing Server Configuration;
Managing Repositories;
Managing Groups;
Managing Routes;
Managing Scheduled Services;
Managing Security;
Managing privileges;
Managing repository targets;
Managing security roles;
Managing users;
Network Configuration;
Maintaining Repositories;
Uploading Artifacts to Hosted Repositories;
Deploying Artifacts to Nexus;
Configuring Deployment Security;
Deploying Releases;
Deploying Snapshots;
Deploying Third-Party Artifacts;
Chapter 17: Writing Plugins;
17.1 Introduction;
17.2 Programming Maven;
17.3 Plugin Descriptor;
17.4 Writing a Custom Plugin;
17.5 Mojo Parameters;
17.6 Plugins and the Maven Lifecycle;
Chapter 18: Writing Plugins in Alternative Languages;
18.1 Writing Plugins in Ant;
18.2 Creating an Ant Plugin;
18.3 Writing Plugins in JRuby;
18.4 Writing Plugins in Groovy;
Settings Details;
Quick Overview;
Settings Details;
Sun Specification Alternatives;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 3 Customer Reviews
  • Anonymous

    Posted July 25, 2012

    O'Reilly does a great job of over coming the B&D issue

    If you have not figured it out yet, B&D locks down the eBook so that you cannot choose the number of columns, this makes reading SW book very difficult. O'Reilly offers a $4.99 upgrade for all the different eBook formats; including, DRM-free which does not suffer the constrains of a B&D version of the book.

    Was this review helpful? Yes  No   Report this review
  • Posted October 13, 2010

    excellent book

    if you're struggling with maven, and who isn't, this is a excellent book.

    Was this review helpful? Yes  No   Report this review
  • Posted January 21, 2009


    Are you looking for a build tool? If you do, then this book is for you! The Sonatype Company has done an outstanding job of writing a book about Maven that is designed to help you build and distribute your project.<BR/><BR/>Sonatype, begins by describing Maven, and explains how it stacks up to and improves on other build tools throughout time; and, shows you how to install and run it on all platforms. Next, the author discusses preserving the narrative progression of a Developer's Notebook, that helps people learn Maven by example. Finally, Sonatype provides you with a large amount of comprehensive reference material.<BR/><BR/><BR/>After reading this most excellent book, you should have a better idea of what Maven is, what makes it different from some of the other options out there, and how to install it and learn more from the built-in help facilities. More importantly, this book will show you how to build and distribute your project.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 3 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)