Maven : A Developer's Notebook

Vincent Massol, Timothy M. O'Brien

  • 出版商: O'Reilly
  • 出版日期: 2005-07-12
  • 售價: $1,040
  • 貴賓價: 9.5$988
  • 語言: 英文
  • 頁數: 224
  • 裝訂: Paperback
  • ISBN: 0596007507
  • ISBN-13: 9780596007508






Maven is a new project management and comprehension tool which provides an elegant way to share build logic across projects. In terms of capabilities, Maven is an improvement to Apache Ant-thanks to numerous plug-ins and built-in integration with unit testing frameworks such as JUnit. Tired of writing the same build logic for every project? Using Maven, you can leverage the experience of the community to avoid the tedious process of creating yet another build script for each new project.

Maven: A Developer's Notebook begins by introducing you to the concept of project object model (POM), and then offers further details on the essential features of Maven. Like all titles in O'Reilly's Developer's Notebook series, this no-nonsense book skips the boring prose and cuts right to the chase. It's an approach that forces you to get your hands dirty by working through a series of poignant labs-exercises that speak to you instead of at you.

Plus, Maven: A Developer's Notebook is the first book on the subject to hit the market, so you know the information is fresh and timely. If you're a Java programmer, you'll be armed with all the critical information you need to get up to speed on this powerful new build tool. You'll discover how Maven can help you:

  • manage a project's build, reporting, and documentation, all from a central piece of information
  • break a complex project into a series of smaller subprojects
  • report on code quality, unit tests, code duplication, and project activity
  • create a custom remote repository
  • build simple and complex plug-ins

In the end, you'll find yourself spending less time working on your project's build system and more time working on your project's code.


Table of Contents:


The Developer's Notebook Series


Chapter 1. Maven Jump-Start

     Installing Maven

     Starting a New Project

     Using Maven Behind a Proxy

     Compiling and Testing a Project

     Working with the Project Object Model

     Listing Available Goals

     Producing Debug Information

     Adding a Dependency

     Depending on Snapshots

     Performing an Offline Build

     Using the Maven Console

     Generating an Eclipse Project

     Using the Eclipse Maven Plug-in

     Generating an Ant Build File

     Migrating a Project from Ant to Maven

     Generating Project Documentation

     Telling Maven About Your Team

     Pointing Maven at Source Control

     Creating a Project Web Site

     Customizing Site Reports

Chapter 2. Customizing Maven

     Installing a Plug-in from a Remote Repository

     Customizing Plug-in Behavior

     Writing a Custom Goal

     Defining a preGoal

     Defining Custom Properties

     Running the Program from a Custom Goal

     Defining the Default Goal

     Overriding Properties

     Enumerating Dependencies

     Customizing Site Look and Feel

     Using the FAQ Plug-in

Chapter 3. Multiproject Maven

     Dividing and Conquering

     Using POM Inheritance

     Writing the Quote Generator

     Sharing Artifacts Through the Local Maven Repository

     Using the WAR Plug-in

     Using the Jetty Plug-in to Start a Web Application

     Executing HtmlUnit Tests

     Building All Subprojects Simultaneously

     Creating Custom Top-Level Goals

     Generating a Multiproject Web Site

Chapter 4. Project Reporting and Publishing

     Reporting on Project Content

     Reporting Testing Status

     Reporting on Code Best Practices

     Reporting on Duplicate Code

     Generating a Quality Dashboard

     Tracking Project Activity

     Tracking Project Changes

     Publishing Maven Artifacts

     Announcing a Project Release

     Reporting Project Releases

     Publishing a Project Web Site

Chapter 5. Team Collaboration with Maven

     Sharing a Maven Installation

     Creating Your Own Remote Maven Repository

     Setting Up a Continuous Integration Build

     Using Binary Dependencies

Chapter 6. Writing Maven Plug-ins

     Writing a Simple JAR Execution Plug-in

     Installing a Plug-in from Its Sources

     Testing a Plug-in

     Writing a Complex Plug-in: The Logifier

     Writing a Logging Aspect Using AspectJ

     Using Plug-in Resources

     Implementing the Logifier Build Logic

     Executing the Logifier Plug-in

     Adding Dynamic Dependencies

     Writing a Plug-in That Generates Reports

     Creating an XDoc File Using JSL

     Publishing a Plug-in to a Remote Repository

Appendix: Maven Plug-ins

     Plug-ins Reference

     Auto-Downloading a Plug-in

     Installing a Plug-in Manually

     Depending on a Plug-in