rent-now

Rent More, Save More! Use code: ECRENTAL

5% off 1 book, 7% off 2 books, 10% off 3+ books

9780596517335

Maven: The Definitive Guide

by
  • ISBN13:

    9780596517335

  • ISBN10:

    0596517335

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2008-09-01
  • Publisher: Oreilly & Associates Inc
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $49.99 Save up to $16.40
  • Buy New
    $49.94
    Add to Cart Free Shipping Icon Free Shipping

    USUALLY SHIPS IN 2-3 BUSINESS DAYS

Summary

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.

Author Biography

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.

Table of Contents

Prefacep. xi
Introduction
Introducing Apache Mavenp. 3
Convention over Configurationp. 3
A Common Interfacep. 4
Universal Reuse Through Maven Pluginsp. 5
Conceptual Model of a "Project"p. 6
Is Maven an Alternative to XYZ?p. 6
Comparing Maven and Antp. 7
Summaryp. 11
Installing and Running Mavenp. 13
Verify Your Java Installationp. 13
Downloading Mavenp. 14
Installing Mavenp. 14
Testing a Maven Installationp. 16
Maven Installation Detailsp. 16
Getting Help with Mavenp. 17
Using the Maven Help Pluginp. 18
About the Apache Software Licensep. 21
Maven by Example
A Simple Maven Projectp. 25
Introductionp. 25
Creating a Simple Projectp. 26
Building a Simple Projectp. 27
Simple Project Object Modelp. 28
Core Conceptsp. 30
Summaryp. 41
Customizing a Maven Projectp. 43
Introductionp. 43
Defining the Simple Weather Projectp. 43
Creating the Simple Weather Projectp. 44
Customize Project Informationp. 45
Add New Dependenciesp. 46
Simple Weather Source Codep. 48
Add Resourcesp. 53
Running the Simple Weather Programp. 54
Writing Unit Testsp. 58
Adding Test-Scoped Dependenciesp. 60
Adding Unit Test Resourcesp. 61
Executing Unit Testsp. 62
Building a Packaged Command-Line Applicationp. 65
A Simple Web Applicationp. 67
Introductionp. 67
Defining the Simple Web Applicationp. 67
Creating the Simple Web Projectp. 68
Configuring the Jetty Pluginp. 69
Adding a Simple Servletp. 71
Adding J2EE Dependenciesp. 73
Conclusionp. 75
A Multimodule Projectp. 77
Introductionp. 77
The Simple Parent Projectp. 77
The Simple Weather Modulep. 79
The Simple Web Application Modulep. 81
Building the Multimodule Projectp. 83
Running the Web Applicationp. 85
Multimodule Enterprise Projectp. 87
Introductionp. 87
The Simple Parent Projectp. 90
The Simple Weather Modulep. 95
The Simple Persist Modulep. 99
The Simple Web Application Modulep. 105
Running the Web Applicationp. 116
The simple-command Modulep. 117
Running simple-commandp. 122
Conclusionp. 125
Maven Reference
Optimizing and Refactoring POMsp. 129
Introductionp. 129
POM Cleanupp. 130
Optimizing Dependenciesp. 130
Optimizing Pluginsp. 134
Optimizing with the Maven Dependency Pluginp. 136
Final POMsp. 139
Conclusionp. 147
The Project Object Modelp. 149
Introductionp. 149
The POMp. 149
POM Syntaxp. 156
Project Dependenciesp. 159
Project Relationshipsp. 168
POM Best Practicesp. 173
The Build Lifecyclep. 181
Introductionp. 181
Package-Specific Lifecyclesp. 185
Common Lifecycle Goalsp. 189
Build Profilesp. 197
What Are They For?p. 197
Portability Through Maven Profilesp. 200
Profile Activationp. 203
External Profilesp. 206
Settings Profilesp. 207
Listing Active Profilesp. 209
Tips and Tricksp. 209
Summaryp. 215
Maven Assembliesp. 217
Introductionp. 217
Assembly Basicsp. 218
Overview of the Assembly Descriptorp. 226
The Assembly Descriptorp. 228
Controlling the Contents of an Assemblyp. 229
Best Practicesp. 252
Summaryp. 259
Properties and Resource Filteringp. 261
Introductionp. 261
Maven Propertiesp. 261
Resource Filteringp. 266
Maven and Eclipse: m2eclipsep. 271
Introductionp. 271
m2eclipsep. 271
Installing the m2eclipse Pluginp. 272
Enabling the Maven Consolep. 274
Creating a Maven Projectp. 275
Create a Maven POM Filep. 280
Importing Maven Projectsp. 282
Running Maven Buildsp. 285
Working with Maven Projectsp. 286
Working with Maven Repositoriesp. 292
Using the Form-Based POM Editorp. 294
Analyzing Project Dependencies in m2eclipsep. 298
Maven Preferencesp. 303
Summaryp. 306
Site Generationp. 309
Introductionp. 309
Building a Project Site with Mavenp. 310
Customizing the Site Descriptorp. 311
Site Directory Structurep. 314
Writing Project Documentationp. 315
Deploying Your Project Web Sitep. 317
Customizing Site Appearancep. 319
Tips and Tricksp. 328
Repository Managerp. 333
Introductionp. 333
Installing Nexusp. 334
Using Nexusp. 341
Configuring Maven to Use Nexus Repositoriesp. 346
Configuring Nexusp. 354
Maintaining Repositoriesp. 374
Deploying Artifacts to Nexusp. 376
Writing Pluginsp. 383
Introductionp. 383
Programming Mavenp. 383
Plugin Descriptorp. 387
Writing a Custom Pluginp. 392
Mojo Parametersp. 400
Plugins and the Maven Lifecyclep. 406
Writing Plugins in Alternative Languagesp. 411
Writing Plugins in Antp. 411
Creating an Ant Pluginp. 412
Writing Plugins in JRubyp. 414
Writing Plugins in Groovyp. 420
Appendixes
Settings Detailsp. 425
Sun Specification Alternativesp. 435
Indexp. 439
Table of Contents provided by Ingram. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program